モジュール 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)
        新しいAttributeTreeオブジェクトを作成し、HTMLタグのHTML属性を表します。
        パラメータ:
        name - 属性の名前
        vkind - 属性値の種類
        value - 属性の値(存在する場合)
        戻り値:
        AttributeTreeオブジェクト
      • newAuthorTree

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        List<DocTree> getFirstSentence​(List<? extends DocTree> list)
        コンテンツのリストに含まれる最初の文を取得します。 最初の文の決定は実装固有のものであり、ロケール固有のBreakIteratorやその他のヒューリスティックを使用する必要があります。 結果リストは、入力リストと共通の初期アイテム・セットを共有することができます。
        パラメータ:
        list - リスト
        戻り値:
        リストの最初の文を含むリスト。