src/jdk.compiler/share/classes/com/sun/source/util/DocTreeFactory.java
author jlahoda
Mon, 01 Apr 2019 14:46:17 +0200
branchjlahoda-tree-builder
changeset 57298 72d5f7163f12
parent 52487 5d1d07b72f15
permissions -rw-r--r--
Adding ability to supply code as text instead of Trees on some places.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     1
/*
46184
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
     2
 * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     4
 *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    10
 *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    15
 * accompanied this code).
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    16
 *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    20
 *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    23
 * questions.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    24
 */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    25
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    26
package com.sun.source.util;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    27
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    28
import java.util.List;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    29
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    30
import javax.lang.model.element.Name;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    31
import javax.tools.Diagnostic;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    32
import javax.tools.JavaFileObject;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    33
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    34
import com.sun.source.doctree.AttributeTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    35
import com.sun.source.doctree.AttributeTree.ValueKind;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    36
import com.sun.source.doctree.AuthorTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    37
import com.sun.source.doctree.CommentTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    38
import com.sun.source.doctree.DeprecatedTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    39
import com.sun.source.doctree.DocCommentTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    40
import com.sun.source.doctree.DocRootTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    41
import com.sun.source.doctree.DocTree;
48028
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
    42
import com.sun.source.doctree.DocTypeTree;
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    43
import com.sun.source.doctree.EndElementTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    44
import com.sun.source.doctree.EntityTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    45
import com.sun.source.doctree.ErroneousTree;
37009
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
    46
import com.sun.source.doctree.HiddenTree;
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    47
import com.sun.source.doctree.IdentifierTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    48
import com.sun.source.doctree.IndexTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    49
import com.sun.source.doctree.InheritDocTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    50
import com.sun.source.doctree.LinkTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    51
import com.sun.source.doctree.LiteralTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    52
import com.sun.source.doctree.ParamTree;
42831
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
    53
import com.sun.source.doctree.ProvidesTree;
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    54
import com.sun.source.doctree.ReferenceTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    55
import com.sun.source.doctree.ReturnTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    56
import com.sun.source.doctree.SeeTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    57
import com.sun.source.doctree.SerialDataTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    58
import com.sun.source.doctree.SerialFieldTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    59
import com.sun.source.doctree.SerialTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    60
import com.sun.source.doctree.SinceTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    61
import com.sun.source.doctree.StartElementTree;
46184
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
    62
import com.sun.source.doctree.SummaryTree;
52487
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
    63
import com.sun.source.doctree.SystemPropertyTree;
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    64
import com.sun.source.doctree.TextTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    65
import com.sun.source.doctree.ThrowsTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    66
import com.sun.source.doctree.UnknownBlockTagTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    67
import com.sun.source.doctree.UnknownInlineTagTree;
42831
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
    68
import com.sun.source.doctree.UsesTree;
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    69
import com.sun.source.doctree.ValueTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    70
import com.sun.source.doctree.VersionTree;
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    71
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    72
/**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    73
 *  Factory for creating {@code DocTree} nodes.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    74
 *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    75
 *  @implNote The methods in an implementation of this interface may only accept {@code DocTree}
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    76
 *  nodes that have been created by the same implementation.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    77
 *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    78
 *  @since 9
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    79
 */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    80
public interface DocTreeFactory {
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    81
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    82
     * Create a new {@code AttributeTree} object, to represent an HTML attribute in an HTML tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    83
     * @param name  the name of the attribute
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    84
     * @param vkind the kind of attribute value
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    85
     * @param value the value, if any, of the attribute
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    86
     * @return an {@code AttributeTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    87
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    88
    AttributeTree newAttributeTree(Name name, ValueKind vkind, List<? extends DocTree> value);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    89
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    90
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    91
     * Create a new {@code AuthorTree} object, to represent an {@code {@author } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    92
     * @param name the name of the author
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    93
     * @return an {@code AuthorTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    94
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    95
    AuthorTree newAuthorTree(List<? extends DocTree> name);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    96
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    97
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    98
     * Create a new {@code CodeTree} object, to represent a {@code {@code } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
    99
     * @param text the content of the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   100
     * @return a {@code CodeTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   101
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   102
    LiteralTree newCodeTree(TextTree text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   103
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   104
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   105
     * Create a new {@code CommentTree}, to represent an HTML comment.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   106
     * @param text the content of the comment
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   107
     * @return a {@code CommentTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   108
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   109
    CommentTree newCommentTree(String text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   110
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   111
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   112
     * Create a new {@code DeprecatedTree} object, to represent an {@code {@deprecated } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   113
     * @param text the content of the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   114
     * @return a {@code DeprecatedTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   115
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   116
    DeprecatedTree newDeprecatedTree(List<? extends DocTree> text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   117
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   118
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   119
     * Create a new {@code DocCommentTree} object, to represent a complete doc comment.
41452
ddaef4bba083 8165991: Fix DocTreeFactory newDocCommentTree
ksrini
parents: 37009
diff changeset
   120
     * @param fullBody the entire body of the doc comment
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   121
     * @param tags the block tags in the doc comment
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   122
     * @return a {@code DocCommentTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   123
     */
41452
ddaef4bba083 8165991: Fix DocTreeFactory newDocCommentTree
ksrini
parents: 37009
diff changeset
   124
    DocCommentTree newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags);
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   125
48028
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   126
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   127
    /**
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   128
     * Create a new {@code DocCommentTree} object, to represent the enitire doc comment.
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   129
     * @param fullBody the entire body of the doc comment
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   130
     * @param tags the block tags in the doc comment
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   131
     * @param preamble the meta content of an html file including the body tag
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   132
     * @param postamble the meta content of an html including the closing body tag
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   133
     * @return a {@code DocCommentTree} object
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   134
     * @since 10
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   135
     */
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   136
    DocCommentTree newDocCommentTree(List<? extends DocTree> fullBody,
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   137
                                     List<? extends DocTree> tags,
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   138
                                     List<? extends DocTree> preamble,
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   139
                                     List<? extends DocTree> postamble);
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   140
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   141
     * Create a new {@code DocRootTree} object, to represent an {@code {@docroot} } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   142
     * @return a {@code DocRootTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   143
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   144
    DocRootTree newDocRootTree();
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   145
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   146
    /**
48028
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   147
     * Create a new {@code DocTypeTree}, to represent a {@code DOCTYPE} HTML declaration.
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   148
     * @param text the content of the declaration
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   149
     * @return a {@code CommentTree} object
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   150
     * @since 10
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   151
     */
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   152
    DocTypeTree newDocTypeTree(String text);
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   153
9e022f580a9d 8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents: 47216
diff changeset
   154
    /**
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   155
     * Create a new {@code EndElement} object, to represent the end of an HTML element.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   156
     * @param name the name of the HTML element
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   157
     * @return an {@code EndElementTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   158
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   159
    EndElementTree newEndElementTree(Name name);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   160
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   161
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   162
     * Create a new {@code EntityTree} object, to represent an HTML entity.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   163
     * @param name the name of the entity, representing the characters between '&lt;' and ';'
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   164
     * in the representation of the entity in an HTML document
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   165
     * @return an {@code EntityTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   166
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   167
    EntityTree newEntityTree(Name name);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   168
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   169
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   170
     * Create a new {@code ErroneousTree} object, to represent some unparseable input.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   171
     * @param text the unparseable text
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   172
     * @param diag a diagnostic associated with the unparseable text, or null
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   173
     * @return an {@code ErroneousTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   174
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   175
    ErroneousTree newErroneousTree(String text, Diagnostic<JavaFileObject> diag);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   176
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   177
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   178
     * Create a new {@code ExceptionTree} object, to represent an {@code @exception } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   179
     * @param name the name of the exception
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   180
     * @param description a description of why the exception might be thrown
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   181
     * @return an {@code ExceptionTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   182
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   183
    ThrowsTree newExceptionTree(ReferenceTree name, List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   184
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   185
    /**
37009
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   186
     * Create a new {@code HiddenTree} object, to represent an {@code {@hidden } } tag.
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   187
     * @param text the content of the tag
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   188
     * @return a {@code HiddenTree} object
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   189
     */
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   190
    HiddenTree newHiddenTree(List<? extends DocTree> text);
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   191
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 35346
diff changeset
   192
    /**
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   193
     * Create a new {@code IdentifierTree} object, to represent an identifier, such as in a
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   194
     * {@code @param } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   195
     * @param name the name of the identifier
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   196
     * @return an {@code IdentifierTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   197
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   198
    IdentifierTree newIdentifierTree(Name name);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   199
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   200
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   201
     * Create a new {@code IndexTree} object, to represent an {@code {@index } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   202
     * @param term the search term
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   203
     * @param description an optional description of the search term
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   204
     * @return an {@code IndexTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   205
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   206
    IndexTree newIndexTree(DocTree term, List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   207
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   208
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   209
     * Create a new {@code InheritDocTree} object, to represent an {@code {@inheritDoc} } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   210
     * @return an {@code InheritDocTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   211
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   212
    InheritDocTree newInheritDocTree();
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   213
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   214
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   215
     * Create a new {@code LinkTree} object, to represent a {@code {@link } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   216
     * @param ref the API element being referenced
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   217
     * @param label an optional label for the link
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   218
     * @return a {@code LinkTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   219
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   220
    LinkTree newLinkTree(ReferenceTree ref, List<? extends DocTree> label);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   221
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   222
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   223
     * Create a new {@code LinkPlainTree} object, to represent a {@code {@linkplain } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   224
     * @param ref the API element being referenced
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   225
     * @param label an optional label for the link
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   226
     * @return a {@code LinkPlainTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   227
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   228
    LinkTree newLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   229
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   230
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   231
     * Create a new {@code LiteralTree} object, to represent a {@code {@literal } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   232
     * @param text the content of the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   233
     * @return a {@code LiteralTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   234
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   235
    LiteralTree newLiteralTree(TextTree text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   236
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   237
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   238
     * Create a new {@code ParamTree} object, to represent a {@code @param } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   239
     * @param isTypeParameter true if this is a type parameter, and false otherwise
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   240
     * @param name the parameter being described
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   241
     * @param description the description of the parameter
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   242
     * @return a {@code ParamTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   243
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   244
    ParamTree newParamTree(boolean isTypeParameter, IdentifierTree name, List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   245
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   246
    /**
42831
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   247
     * Create a new {@code ProvidesTree} object, to represent a {@code @provides } tag.
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   248
     * @param name the name of the service type
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   249
     * @param description a description of the service being provided
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   250
     * @return a {@code ProvidesTree} object
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   251
     */
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   252
    ProvidesTree newProvidesTree(ReferenceTree name, List<? extends DocTree> description);
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   253
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   254
    /**
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   255
     * Create a new {@code ReferenceTree} object, to represent a reference to an API element.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   256
     *
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   257
     * @param signature the doc comment signature of the reference
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   258
     * @return a {@code ReferenceTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   259
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   260
    ReferenceTree newReferenceTree(String signature);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   261
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   262
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   263
     * Create a new {@code ReturnTree} object, to represent a {@code @return } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   264
     * @param description the description of the return value of a method
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   265
     * @return a {@code ReturnTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   266
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   267
    ReturnTree newReturnTree(List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   268
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   269
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   270
     * Create a new {@code SeeTree} object, to represent a {@code @see } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   271
     * @param reference the reference
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   272
     * @return a {@code SeeTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   273
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   274
    SeeTree newSeeTree(List<? extends DocTree> reference);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   275
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   276
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   277
     * Create a new {@code SerialTree} object, to represent a {@code @serial } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   278
     * @param description the description for the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   279
     * @return a {@code SerialTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   280
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   281
    SerialTree newSerialTree(List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   282
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   283
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   284
     * Create a new {@code SerialDataTree} object, to represent a {@code @serialData } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   285
     * @param description the description for the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   286
     * @return a {@code SerialDataTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   287
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   288
    SerialDataTree newSerialDataTree(List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   289
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   290
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   291
     * Create a new {@code SerialFieldTree} object, to represent a {@code @serialField } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   292
     * @param name the name of the field
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   293
     * @param type the type of the field
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   294
     * @param description the description of the field
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   295
     * @return a {@code SerialFieldTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   296
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   297
    SerialFieldTree newSerialFieldTree(IdentifierTree name, ReferenceTree type, List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   298
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   299
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   300
     * Create a new {@code SinceTree} object, to represent a {@code @since } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   301
     * @param text the content of the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   302
     * @return a {@code SinceTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   303
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   304
    SinceTree newSinceTree(List<? extends DocTree> text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   305
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   306
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   307
     * Create a new {@code StartElementTree} object, to represent the start of an HTML element.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   308
     * @param name the name of the HTML element
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   309
     * @param attrs the attributes
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   310
     * @param selfClosing true if the start element is marked as self-closing; otherwise false
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   311
     * @return a {@code StartElementTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   312
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   313
    StartElementTree newStartElementTree(Name name, List<? extends DocTree> attrs, boolean selfClosing);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   314
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   315
    /**
46184
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   316
     * Create a new {@code SummaryTree} object, to represent a {@code @summary } tag.
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   317
     *
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   318
     * @implSpec This implementation throws {@code UnsupportedOperationException}.
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   319
     *
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   320
     * @param summary the content of the tag
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   321
     * @return a {@code SummaryTree} object
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   322
     * @since 10
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   323
     */
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   324
    default SummaryTree newSummaryTree(List<? extends DocTree> summary) {
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   325
        throw new UnsupportedOperationException("not implemented");
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   326
    }
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   327
f1325703ea85 8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents: 42831
diff changeset
   328
    /**
52487
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   329
     * Create a new {@code SystemPropertyTree} object, to represent a {@code {@systemProperty } } tag.
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   330
     *
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   331
     * @param propertyName the system property name
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   332
     * @return a {@code SystemPropertyTree} object
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   333
     * @since 12
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   334
     */
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   335
    SystemPropertyTree newSystemPropertyTree(Name propertyName);
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   336
5d1d07b72f15 5076751: System properties documentation needed in javadocs
pmuthuswamy
parents: 48028
diff changeset
   337
    /**
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   338
     * Create a new {@code TextTree} object, to represent some plain text.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   339
     * @param text the text
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   340
     * @return a {@code TextTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   341
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   342
    TextTree newTextTree(String text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   343
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   344
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   345
     * Create a new {@code ThrowsTree} object, to represent a {@code @throws } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   346
     * @param name the name of the exception
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   347
     * @param description a description of why the exception might be thrown
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   348
     * @return a {@code ThrowsTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   349
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   350
    ThrowsTree newThrowsTree(ReferenceTree name, List<? extends DocTree> description);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   351
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   352
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   353
     * Create a new {@code UnknownBlockTagTree} object, to represent an unrecognized block tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   354
     * @param name the name of the block tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   355
     * @param content the content
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   356
     * @return an {@code UnknownBlockTagTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   357
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   358
    UnknownBlockTagTree newUnknownBlockTagTree(Name name, List<? extends DocTree> content);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   359
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   360
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   361
     * Create a new {@code UnknownInlineTagTree} object, to represent an unrecognized inline tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   362
     * @param name the name of the inline tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   363
     * @param content the content
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   364
     * @return an {@code UnknownInlineTagTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   365
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   366
    UnknownInlineTagTree newUnknownInlineTagTree(Name name, List<? extends DocTree> content);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   367
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   368
    /**
42831
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   369
     * Create a new {@code UsesTree} object, to represent a {@code @uses } tag.
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   370
     * @param name the name of the service type
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   371
     * @param description a description of how the service will be used
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   372
     * @return a {@code UsesTree} object
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   373
     */
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   374
    UsesTree newUsesTree(ReferenceTree name, List<? extends DocTree> description);
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   375
feff6f296019 8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents: 41452
diff changeset
   376
    /**
35346
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   377
     * Create a new {@code ValueTree} object, to represent a {@code {@value } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   378
     * @param ref a reference to the value
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   379
     * @return a {@code ValueTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   380
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   381
    ValueTree newValueTree(ReferenceTree ref);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   382
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   383
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   384
     * Create a new {@code VersionTree} object, to represent a {@code {@version } } tag.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   385
     * @param text the content of the tag
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   386
     * @return a {@code VersionTree} object
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   387
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   388
    VersionTree newVersionTree(List<? extends DocTree> text);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   389
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   390
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   391
     * Set the position to be recorded in subsequent tree nodes created by this factory.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   392
     * The position should be a character offset relative to the beginning of the source file
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   393
     * or {@link javax.tools.Diagnostic#NOPOS NOPOS}.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   394
     * @param pos the position
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   395
     * @return this object, to facilitate method chaining
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   396
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   397
    DocTreeFactory at(int pos);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   398
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   399
    /**
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   400
     * Get the first sentence contained in a list of content.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   401
     * The determination of the first sentence is implementation specific, and may
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   402
     * involve the use of a locale-specific {@link java.text.BreakIterator BreakIterator}
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   403
     * and other heuristics.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   404
     * The resulting list may share a common set of initial items with the input list.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   405
     * @param list the list
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   406
     * @return a list containing the first sentence of the list.
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   407
     */
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   408
    List<DocTree> getFirstSentence(List<? extends DocTree> list);
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   409
c0614a805fad 8146208: Add a public DocTreeFactory to the Compiler Tree API
jjg
parents:
diff changeset
   410
}