langtools/src/jdk.compiler/share/classes/com/sun/source/doctree/DocTree.java
author ksrini
Sun, 10 Apr 2016 08:41:00 -0700
changeset 37009 476d8d615222
parent 34916 16043fc1d90b
child 42831 feff6f296019
permissions -rw-r--r--
8073100: [javadoc] Provide an ability to suppress document generation for specific elements. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     1
/*
37009
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
     2
 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     4
 *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    10
 *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    15
 * accompanied this code).
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    16
 *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    20
 *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    23
 * questions.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    24
 */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    25
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    26
package com.sun.source.doctree;
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    27
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    28
/**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    29
 * Common interface for all nodes in a documentation syntax tree.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    30
 *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    31
 * @since 1.8
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    32
 */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    33
public interface DocTree {
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
    34
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
    35
     * Enumerates all kinds of trees.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
    36
     */
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    37
    enum Kind {
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    38
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    39
         * Used for instances of {@link AttributeTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    40
         * representing an HTML attribute.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    41
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    42
        ATTRIBUTE,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    43
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    44
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    45
         * Used for instances of {@link AuthorTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    46
         * representing an @author tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    47
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    48
        AUTHOR("author"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    49
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    50
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    51
         * Used for instances of {@link LiteralTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    52
         * representing an @code tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    53
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    54
        CODE("code"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    55
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    56
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    57
         * Used for instances of {@link CommentTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    58
         * representing an HTML comment.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    59
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    60
        COMMENT,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    61
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    62
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    63
         * Used for instances of {@link DeprecatedTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    64
         * representing an @deprecated tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    65
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    66
        DEPRECATED("deprecated"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    67
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    68
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    69
         * Used for instances of {@link DocCommentTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    70
         * representing a complete doc comment.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    71
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    72
        DOC_COMMENT,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    73
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    74
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    75
         * Used for instances of {@link DocRootTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    76
         * representing an @docRoot tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    77
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    78
        DOC_ROOT("docRoot"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    79
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    80
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    81
         * Used for instances of {@link EndElementTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    82
         * representing the end of an HTML element.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    83
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    84
        END_ELEMENT,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    85
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    86
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    87
         * Used for instances of {@link EntityTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    88
         * representing an HTML entity.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    89
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    90
        ENTITY,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    91
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    92
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    93
         * Used for instances of {@link ErroneousTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    94
         * representing some invalid text.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    95
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    96
        ERRONEOUS,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    97
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    98
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
    99
         * Used for instances of {@link ThrowsTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   100
         * representing an @exception tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   101
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   102
        EXCEPTION("exception"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   103
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   104
        /**
37009
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   105
         * Used for instances of {@link HiddenTree}
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   106
         * representing an @hidden tag.
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   107
         */
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   108
        HIDDEN("hidden"),
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   109
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   110
        /**
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   111
         * Used for instances of {@link IdentifierTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   112
         * representing an identifier.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   113
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   114
        IDENTIFIER,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   115
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   116
        /**
37009
476d8d615222 8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents: 34916
diff changeset
   117
         * Used for instances of {@link IndexTree}
34567
c74f68484156 8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents: 25874
diff changeset
   118
         * representing a search term.
c74f68484156 8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents: 25874
diff changeset
   119
         */
c74f68484156 8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents: 25874
diff changeset
   120
        INDEX("index"),
c74f68484156 8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents: 25874
diff changeset
   121
c74f68484156 8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents: 25874
diff changeset
   122
        /**
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   123
         * Used for instances of {@link InheritDocTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   124
         * representing an @inheritDoc tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   125
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   126
        INHERIT_DOC("inheritDoc"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   127
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   128
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   129
         * Used for instances of {@link LinkTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   130
         * representing an @link tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   131
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   132
        LINK("link"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   133
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   134
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   135
         * Used for instances of {@link LinkTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   136
         * representing an @linkplain tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   137
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   138
        LINK_PLAIN("linkplain"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   139
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   140
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   141
         * Used for instances of {@link LiteralTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   142
         * representing an @literal tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   143
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   144
        LITERAL("literal"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   145
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   146
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   147
         * Used for instances of {@link ParamTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   148
         * representing an @param tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   149
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   150
        PARAM("param"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   151
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   152
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   153
         * Used for instances of {@link ReferenceTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   154
         * representing a reference to a element in the
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   155
         * Java programming language.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   156
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   157
        REFERENCE,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   158
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   159
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   160
         * Used for instances of {@link ReturnTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   161
         * representing an @return tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   162
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   163
        RETURN("return"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   164
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   165
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   166
         * Used for instances of {@link SeeTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   167
         * representing an @see tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   168
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   169
        SEE("see"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   170
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   171
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   172
         * Used for instances of {@link SerialTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   173
         * representing an @serial tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   174
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   175
        SERIAL("serial"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   176
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   177
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   178
         * Used for instances of {@link SerialDataTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   179
         * representing an @serialData tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   180
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   181
        SERIAL_DATA("serialData"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   182
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   183
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   184
         * Used for instances of {@link SerialFieldTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   185
         * representing an @serialField tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   186
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   187
        SERIAL_FIELD("serialField"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   188
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   189
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   190
         * Used for instances of {@link SinceTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   191
         * representing an @since tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   192
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   193
        SINCE("since"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   194
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   195
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   196
         * Used for instances of {@link EndElementTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   197
         * representing the start of an HTML element.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   198
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   199
        START_ELEMENT,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   200
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   201
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   202
         * Used for instances of {@link TextTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   203
         * representing some documentation text.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   204
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   205
        TEXT,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   206
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   207
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   208
         * Used for instances of {@link ThrowsTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   209
         * representing an @throws tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   210
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   211
        THROWS("throws"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   212
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   213
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   214
         * Used for instances of {@link UnknownBlockTagTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   215
         * representing an unknown block tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   216
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   217
        UNKNOWN_BLOCK_TAG,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   218
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   219
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   220
         * Used for instances of {@link UnknownInlineTagTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   221
         * representing an unknown inline tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   222
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   223
        UNKNOWN_INLINE_TAG,
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   224
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   225
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   226
         * Used for instances of {@link ValueTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   227
         * representing an @value tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   228
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   229
        VALUE("value"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   230
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   231
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   232
         * Used for instances of {@link VersionTree}
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   233
         * representing an @version tag.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   234
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   235
        VERSION("version"),
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   236
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   237
        /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   238
         * An implementation-reserved node. This is the not the node
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   239
         * you are looking for.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   240
         */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   241
        OTHER;
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   242
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   243
        /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   244
         * The name of the tag, if any, associated with this kind of node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   245
         */
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   246
        public final String tagName;
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   247
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   248
        Kind() {
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   249
            tagName = null;
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   250
        }
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   251
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   252
        Kind(String tagName) {
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   253
            this.tagName = tagName;
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   254
        }
22163
3651128c74eb 8030244: Update langtools to use Diamond
briangoetz
parents: 20612
diff changeset
   255
    }
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   256
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   257
    /**
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   258
     * Returns the kind of this tree.
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   259
     *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   260
     * @return the kind of this tree.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   261
     */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   262
    Kind getKind();
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   263
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   264
    /**
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   265
     * Accept method used to implement the visitor pattern.  The
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   266
     * visitor pattern is used to implement operations on trees.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   267
     *
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   268
     * @param <R> result type of this operation.
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   269
     * @param <D> type of additional data.
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   270
     * @param visitor the visitor to be called
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   271
     * @param data a parameter value to be passed to the visitor method
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 22163
diff changeset
   272
     * @return the value returned from the visitor method
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   273
     */
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   274
    <R, D> R accept(DocTreeVisitor<R,D> visitor, D data);
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff changeset
   275
}