モジュール jdk.compiler
パッケージ com.sun.source.util

インタフェースDocTreeFactory


  • public interface DocTreeFactory
    DocTreeノードを作成するためのファクトリ。
    実装上のノート:
    このインタフェースの実装内のメソッドは、同じ実装によって作成されたDocTreeノードのみを受け入れることができます。
    導入されたバージョン:
    9
    • メソッドの詳細

      • newAttributeTree

        AttributeTree newAttributeTree​(Name name,
                                       AttributeTree.ValueKind vkind,
                                       List<? extends DocTree> value)
        HTMLタグのHTML属性を表す新しいAttributeTreeオブジェクトを作成します。
        パラメータ:
        name - 属性の名前
        vkind - 属性値の種類
        value - 属性の値(存在する場合)
        戻り値:
        AttributeTreeオブジェクト
      • newAuthorTree

        AuthorTree newAuthorTree​(List<? extends DocTree> name)
        {@author } タグを表す新しいAuthorTreeオブジェクトを作成します。
        パラメータ:
        name - 作成者の名前
        戻り値:
        AuthorTreeオブジェクト
      • newCodeTree

        LiteralTree newCodeTree​(TextTree text)
        {@code } タグを表す新しいCodeTreeオブジェクトを作成します。
        パラメータ:
        text - タグの内容
        戻り値:
        CodeTreeオブジェクト
      • newCommentTree

        CommentTree newCommentTree​(String text)
        HTMLコメントを表す新しいCommentTreeを作成します。
        パラメータ:
        text - コメントの内容
        戻り値:
        CommentTreeオブジェクト
      • newDeprecatedTree

        DeprecatedTree newDeprecatedTree​(List<? extends DocTree> text)
        {@deprecated } タグを表す新しいDeprecatedTreeオブジェクトを作成します。
        パラメータ:
        text - タグの内容
        戻り値:
        DeprecatedTreeオブジェクト
      • newDocCommentTree

        DocCommentTree newDocCommentTree​(List<? extends DocTree> fullBody,
                                         List<? extends DocTree> tags)
        完全なドキュメント・コメントを表す新しいDocCommentTreeオブジェクトを作成します。
        パラメータ:
        fullBody - docコメントの本文全体
        tags - docコメント内のブロック・タグ
        戻り値:
        DocCommentTreeオブジェクト
      • newDocCommentTree

        DocCommentTree newDocCommentTree​(List<? extends DocTree> fullBody,
                                         List<? extends DocTree> tags,
                                         List<? extends DocTree> preamble,
                                         List<? extends DocTree> postamble)
        enitireドキュメント・コメントを表す新しいDocCommentTreeオブジェクトを作成します。
        パラメータ:
        fullBody - docコメントの本文全体
        tags - docコメント内のブロック・タグ
        preamble - bodyタグを含むhtmlファイルのメタ・コンテンツ
        postamble - 終了ボディ・タグを含むhtmlのメタ・コンテンツ
        戻り値:
        DocCommentTreeオブジェクト
        導入されたバージョン:
        10
      • newDocRootTree

        DocRootTree newDocRootTree()
        {@docroot} タグを表す新しいDocRootTreeオブジェクトを作成します。
        戻り値:
        DocRootTreeオブジェクト
      • newDocTypeTree

        DocTypeTree newDocTypeTree​(String text)
        DOCTYPE HTML宣言を表す新しいDocTypeTreeを作成します。
        パラメータ:
        text - 宣言の内容
        戻り値:
        CommentTreeオブジェクト
        導入されたバージョン:
        10
      • newEndElementTree

        EndElementTree newEndElementTree​(Name name)
        HTML要素の終わりを表す新しいEndElementオブジェクトを作成します。
        パラメータ:
        name - HTML要素の名前
        戻り値:
        EndElementTreeオブジェクト
      • newEntityTree

        EntityTree newEntityTree​(Name name)
        HTMLエンティティを表す新しいEntityTreeオブジェクトを作成します。
        パラメータ:
        name - HTMLドキュメント内のエンティティの表現における'<'と';'の間の文字を表すエンティティの名前
        戻り値:
        EntityTreeオブジェクト
      • newErroneousTree

        ErroneousTree newErroneousTree​(String text,
                                       Diagnostic<JavaFileObject> diag)
        解析不可能な入力を表す新しいErroneousTreeオブジェクトを作成します。
        パラメータ:
        text - 解析不可能なテキスト
        diag - 解析不可能なテキストに関連付けられた診断、またはnull
        戻り値:
        ErroneousTreeオブジェクト
      • newExceptionTree

        ThrowsTree newExceptionTree​(ReferenceTree name,
                                    List<? extends DocTree> description)
        @exception タグを表す新しいExceptionTreeオブジェクトを作成します。
        パラメータ:
        name - 例外の名前
        description - 例外がスローされる理由の説明
        戻り値:
        ExceptionTreeオブジェクト
      • newHiddenTree

        HiddenTree newHiddenTree​(List<? extends DocTree> text)
        {@hidden } タグを表す新しいHiddenTreeオブジェクトを作成します。
        パラメータ:
        text - タグの内容
        戻り値:
        HiddenTreeオブジェクト
      • newIdentifierTree

        IdentifierTree newIdentifierTree​(Name name)
        識別子を表す新しいIdentifierTreeオブジェクト(@param タグなど)を作成します。
        パラメータ:
        name - 識別子の名前
        戻り値:
        IdentifierTreeオブジェクト
      • newIndexTree

        IndexTree newIndexTree​(DocTree term,
                               List<? extends DocTree> description)
        {@index } タグを表す新しいIndexTreeオブジェクトを作成します。
        パラメータ:
        term - 検索語
        description - 検索語の説明(オプション)
        戻り値:
        IndexTreeオブジェクト
      • newInheritDocTree

        InheritDocTree newInheritDocTree()
        {@inheritDoc} タグを表す新しいInheritDocTreeオブジェクトを作成します。
        戻り値:
        InheritDocTreeオブジェクト
      • newLinkTree

        LinkTree newLinkTree​(ReferenceTree ref,
                             List<? extends DocTree> label)
        {@link } タグを表す新しいLinkTreeオブジェクトを作成します。
        パラメータ:
        ref - 参照されているAPI要素
        label - リンクのオプションのラベル
        戻り値:
        LinkTreeオブジェクト
      • newLinkPlainTree

        LinkTree newLinkPlainTree​(ReferenceTree ref,
                                  List<? extends DocTree> label)
        {@linkplain } タグを表す新しいLinkPlainTreeオブジェクトを作成します。
        パラメータ:
        ref - 参照されているAPI要素
        label - リンクのオプションのラベル
        戻り値:
        LinkPlainTreeオブジェクト
      • newLiteralTree

        LiteralTree newLiteralTree​(TextTree text)
        {@literal } タグを表す新しいLiteralTreeオブジェクトを作成します。
        パラメータ:
        text - タグの内容
        戻り値:
        LiteralTreeオブジェクト
      • newParamTree

        ParamTree newParamTree​(boolean isTypeParameter,
                               IdentifierTree name,
                               List<? extends DocTree> description)
        @param タグを表す新しいParamTreeオブジェクトを作成します。
        パラメータ:
        isTypeParameter - これが型パラメータの場合はtrue、それ以外の場合はfalse
        name - 説明されているパラメータ
        description - パラメータの説明
        戻り値:
        ParamTreeオブジェクト
      • newProvidesTree

        ProvidesTree newProvidesTree​(ReferenceTree name,
                                     List<? extends DocTree> description)
        @provides タグを表す新しいProvidesTreeオブジェクトを作成します。
        パラメータ:
        name - サービス・タイプの名前
        description - 提供されているサービスの説明
        戻り値:
        ProvidesTreeオブジェクト
      • newReferenceTree

        ReferenceTree newReferenceTree​(String signature)
        API要素への参照を表す新しいReferenceTreeオブジェクトを作成します。
        パラメータ:
        signature - 参照のdocコメント・シグネチャ
        戻り値:
        ReferenceTreeオブジェクト
      • newReturnTree

        ReturnTree newReturnTree​(List<? extends DocTree> description)
        @return タグを表す新しいReturnTreeオブジェクトを作成します。
        パラメータ:
        description - メソッドの戻り値の説明
        戻り値:
        ReturnTreeオブジェクト
      • newSeeTree

        SeeTree newSeeTree​(List<? extends DocTree> reference)
        @see タグを表す新しいSeeTreeオブジェクトを作成します。
        パラメータ:
        reference - 参照
        戻り値:
        SeeTreeオブジェクト
      • newSerialTree

        SerialTree newSerialTree​(List<? extends DocTree> description)
        @serial タグを表す新しいSerialTreeオブジェクトを作成します。
        パラメータ:
        description - タグの説明
        戻り値:
        SerialTreeオブジェクト
      • newSerialDataTree

        SerialDataTree newSerialDataTree​(List<? extends DocTree> description)
        @serialData タグを表す新しいSerialDataTreeオブジェクトを作成します。
        パラメータ:
        description - タグの説明
        戻り値:
        SerialDataTreeオブジェクト
      • newSerialFieldTree

        SerialFieldTree newSerialFieldTree​(IdentifierTree name,
                                           ReferenceTree type,
                                           List<? extends DocTree> description)
        @serialField タグを表す新しいSerialFieldTreeオブジェクトを作成します。
        パラメータ:
        name - フィールドの名前
        type - フィールドのタイプ
        description - フィールドの説明
        戻り値:
        SerialFieldTreeオブジェクト
      • newSinceTree

        SinceTree newSinceTree​(List<? extends DocTree> text)
        @since タグを表す新しいSinceTreeオブジェクトを作成します。
        パラメータ:
        text - タグの内容
        戻り値:
        SinceTreeオブジェクト
      • newStartElementTree

        StartElementTree newStartElementTree​(Name name,
                                             List<? extends DocTree> attrs,
                                             boolean selfClosing)
        HTML要素の開始を表す新しいStartElementTreeオブジェクトを作成します。
        パラメータ:
        name - HTML要素の名前
        attrs - 属性
        selfClosing - 開始要素が自己クローズとしてマークされている場合はtrue、それ以外の場合はfalse
        戻り値:
        StartElementTreeオブジェクト
      • newSummaryTree

        default SummaryTree newSummaryTree​(List<? extends DocTree> summary)
        @summary タグを表す新しいSummaryTreeオブジェクトを作成します。
        実装要件:
        この実装では、UnsupportedOperationExceptionがスローされます。
        パラメータ:
        summary - タグの内容
        戻り値:
        SummaryTreeオブジェクト
        導入されたバージョン:
        10
      • newTextTree

        TextTree newTextTree​(String text)
        プレーン・テキストを表す新しいTextTreeオブジェクトを作成します。
        パラメータ:
        text - テキスト
        戻り値:
        TextTreeオブジェクト
      • newThrowsTree

        ThrowsTree newThrowsTree​(ReferenceTree name,
                                 List<? extends DocTree> description)
        @throws タグを表す新しいThrowsTreeオブジェクトを作成します。
        パラメータ:
        name - 例外の名前
        description - 例外がスローされる理由の説明
        戻り値:
        ThrowsTreeオブジェクト
      • newUnknownBlockTagTree

        UnknownBlockTagTree newUnknownBlockTagTree​(Name name,
                                                   List<? extends DocTree> content)
        認識されないブロック・タグを表す新しいUnknownBlockTagTreeオブジェクトを作成します。
        パラメータ:
        name - ブロック・タグの名前
        content - コンテンツ
        戻り値:
        UnknownBlockTagTreeオブジェクト
      • newUnknownInlineTagTree

        UnknownInlineTagTree newUnknownInlineTagTree​(Name name,
                                                     List<? extends DocTree> content)
        認識されないインライン・タグを表す新しいUnknownInlineTagTreeオブジェクトを作成します。
        パラメータ:
        name - インライン・タグの名前
        content - コンテンツ
        戻り値:
        UnknownInlineTagTreeオブジェクト
      • newUsesTree

        UsesTree newUsesTree​(ReferenceTree name,
                             List<? extends DocTree> description)
        @uses タグを表す新しいUsesTreeオブジェクトを作成します。
        パラメータ:
        name - サービス・タイプの名前
        description - サービスの使用方法の説明
        戻り値:
        UsesTreeオブジェクト
      • newValueTree

        ValueTree newValueTree​(ReferenceTree ref)
        {@value } タグを表す新しいValueTreeオブジェクトを作成します。
        パラメータ:
        ref - 値への参照
        戻り値:
        ValueTreeオブジェクト
      • newVersionTree

        VersionTree newVersionTree​(List<? extends DocTree> text)
        {@version } タグを表す新しいVersionTreeオブジェクトを作成します。
        パラメータ:
        text - タグの内容
        戻り値:
        VersionTreeオブジェクト
      • at

        DocTreeFactory at​(int pos)
        このファクトリで作成された後続のツリー・ノードに記録する位置を設定します。 位置は、ソースファイルまたは NOPOSの先頭からの相対的な文字オフセットにしてください。
        パラメータ:
        pos - 位置
        戻り値:
        このオブジェクト、メソッドの連鎖を容易にするため
      • getFirstSentence

        List<DocTree> getFirstSentence​(List<? extends DocTree> list)
        コンテンツのリストに含まれる最初の文を取得します。 最初の文の決定は実装固有であり、ロケール固有のBreakIteratorおよびその他の経験則の使用が含まれる場合があります。 結果のリストは、入力リストと共通の初期項目のセットを共有できます。
        パラメータ:
        list - リスト
        戻り値:
        リストの最初の文を含むリスト。