src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java
author jlahoda
Wed, 27 Nov 2019 09:00:01 +0100
changeset 59285 7799a51dbe30
parent 59021 cfc7bb9a5a92
permissions -rw-r--r--
8231826: Implement javac changes for pattern matching for instanceof Reviewed-by: mcimadamore Contributed-by: brian.goetz@oracle.com, gavin.bierman@oracle.com, maurizio.cimadamore@oracle.com, srikanth.adayapalam@oracle.com, vicente.romero@oracle.com, jan.lahoda@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
55306
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
     2
 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5492
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5492
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5492
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5492
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5492
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.source.tree;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
 * Common interface for all nodes in an abstract syntax tree.
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
 * <p><b>WARNING:</b> This interface and its sub-interfaces are
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
 * subject to change as the Java&trade; programming language evolves.
5848
c5a4ce47e780 6960407: Potential rebranding issues in openjdk/langtools repository sources
jjg
parents: 5520
diff changeset
    33
 * These interfaces are implemented by the JDK Java compiler (javac)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
 * and should not be implemented either directly or indirectly by
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 * other applications.
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * @author Peter von der Ah&eacute;
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * @author Jonathan Gibbons
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * @since 1.6
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
public interface Tree {
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
     * Enumerates all kinds of trees.
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
    public enum Kind {
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    48
        /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    49
         * Used for instances of {@link AnnotatedTypeTree}
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    50
         * representing annotated types.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    51
         */
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    52
        ANNOTATED_TYPE(AnnotatedTypeTree.class),
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    53
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
        /**
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    55
         * Used for instances of {@link AnnotationTree}
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    56
         * representing declaration annotations.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
        ANNOTATION(AnnotationTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        /**
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    61
         * Used for instances of {@link AnnotationTree}
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    62
         * representing type annotations.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    63
         */
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    64
        TYPE_ANNOTATION(AnnotationTree.class),
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    65
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    66
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
         * Used for instances of {@link ArrayAccessTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
        ARRAY_ACCESS(ArrayAccessTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
         * Used for instances of {@link ArrayTypeTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
        ARRAY_TYPE(ArrayTypeTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
         * Used for instances of {@link AssertTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
        ASSERT(AssertTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
         * Used for instances of {@link AssignmentTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        ASSIGNMENT(AssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
         * Used for instances of {@link BlockTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        BLOCK(BlockTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
         * Used for instances of {@link BreakTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        BREAK(BreakTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
         * Used for instances of {@link CaseTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        CASE(CaseTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
         * Used for instances of {@link CatchTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
        CATCH(CatchTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
        /**
6580
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   107
         * Used for instances of {@link ClassTree} representing classes.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        CLASS(ClassTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
         * Used for instances of {@link CompilationUnitTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
        COMPILATION_UNIT(CompilationUnitTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
         * Used for instances of {@link ConditionalExpressionTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
        CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
         * Used for instances of {@link ContinueTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
        CONTINUE(ContinueTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
         * Used for instances of {@link DoWhileLoopTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
        DO_WHILE_LOOP(DoWhileLoopTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
         * Used for instances of {@link EnhancedForLoopTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        ENHANCED_FOR_LOOP(EnhancedForLoopTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
         * Used for instances of {@link ExpressionStatementTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
        EXPRESSION_STATEMENT(ExpressionStatementTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
         * Used for instances of {@link MemberSelectTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        MEMBER_SELECT(MemberSelectTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
        /**
11142
45d0ec1e7463 7115049: Add AST node for method references
mcimadamore
parents: 11141
diff changeset
   147
         * Used for instances of {@link MemberReferenceTree}.
45d0ec1e7463 7115049: Add AST node for method references
mcimadamore
parents: 11141
diff changeset
   148
         */
45d0ec1e7463 7115049: Add AST node for method references
mcimadamore
parents: 11141
diff changeset
   149
        MEMBER_REFERENCE(MemberReferenceTree.class),
45d0ec1e7463 7115049: Add AST node for method references
mcimadamore
parents: 11141
diff changeset
   150
45d0ec1e7463 7115049: Add AST node for method references
mcimadamore
parents: 11141
diff changeset
   151
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
         * Used for instances of {@link ForLoopTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
        FOR_LOOP(ForLoopTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
         * Used for instances of {@link IdentifierTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
        IDENTIFIER(IdentifierTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
         * Used for instances of {@link IfTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        IF(IfTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
         * Used for instances of {@link ImportTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
        IMPORT(ImportTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
         * Used for instances of {@link InstanceOfTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        INSTANCE_OF(InstanceOfTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
         * Used for instances of {@link LabeledStatementTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
        LABELED_STATEMENT(LabeledStatementTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
         * Used for instances of {@link MethodTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
        METHOD(MethodTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
         * Used for instances of {@link MethodInvocationTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
        METHOD_INVOCATION(MethodInvocationTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
         * Used for instances of {@link ModifiersTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
        MODIFIERS(ModifiersTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
         * Used for instances of {@link NewArrayTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
        NEW_ARRAY(NewArrayTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
         * Used for instances of {@link NewClassTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        NEW_CLASS(NewClassTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        /**
11141
7d112a1ecd0f 7115046: Add AST node for lambda expressions
mcimadamore
parents: 9300
diff changeset
   207
         * Used for instances of {@link LambdaExpressionTree}.
7d112a1ecd0f 7115046: Add AST node for lambda expressions
mcimadamore
parents: 9300
diff changeset
   208
         */
7d112a1ecd0f 7115046: Add AST node for lambda expressions
mcimadamore
parents: 9300
diff changeset
   209
        LAMBDA_EXPRESSION(LambdaExpressionTree.class),
7d112a1ecd0f 7115046: Add AST node for lambda expressions
mcimadamore
parents: 9300
diff changeset
   210
7d112a1ecd0f 7115046: Add AST node for lambda expressions
mcimadamore
parents: 9300
diff changeset
   211
        /**
24069
dfb8f11542fc 8034245: Refactor TopLevel tree node.
pgovereau
parents: 20612
diff changeset
   212
         * Used for instances of {@link PackageTree}.
34912
954fa9df99c7 8146572: Update "@since 1.9" to "@since 9" to match java.version.specification [langtools]
jjg
parents: 25874
diff changeset
   213
         * @since 9
24069
dfb8f11542fc 8034245: Refactor TopLevel tree node.
pgovereau
parents: 20612
diff changeset
   214
         */
dfb8f11542fc 8034245: Refactor TopLevel tree node.
pgovereau
parents: 20612
diff changeset
   215
        PACKAGE(PackageTree.class),
dfb8f11542fc 8034245: Refactor TopLevel tree node.
pgovereau
parents: 20612
diff changeset
   216
dfb8f11542fc 8034245: Refactor TopLevel tree node.
pgovereau
parents: 20612
diff changeset
   217
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
         * Used for instances of {@link ParenthesizedTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
        PARENTHESIZED(ParenthesizedTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
        /**
59285
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   223
         * {@preview Associated with pattern matching for instanceof, a preview feature of
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   224
         *           the Java language.
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   225
         *
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   226
         *           This enum constant is associated with <i>pattern matching for instanceof</i>, a preview
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   227
         *           feature of the Java language. Preview features
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   228
         *           may be removed in a future release, or upgraded to permanent
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   229
         *           features of the Java language.}
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   230
         *
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   231
         * Used for instances of {@link BindingPatternTree}.
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   232
         *
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   233
         * @since 14
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   234
         */
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   235
        BINDING_PATTERN(BindingPatternTree.class),
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   236
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   237
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
         * Used for instances of {@link PrimitiveTypeTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
        PRIMITIVE_TYPE(PrimitiveTypeTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
         * Used for instances of {@link ReturnTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        RETURN(ReturnTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
         * Used for instances of {@link EmptyStatementTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        EMPTY_STATEMENT(EmptyStatementTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
         * Used for instances of {@link SwitchTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
        SWITCH(SwitchTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        /**
51563
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   258
         * Used for instances of {@link SwitchExpressionTree}.
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   259
         *
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   260
         * @since 12
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   261
         */
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   262
        SWITCH_EXPRESSION(SwitchExpressionTree.class),
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   263
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   264
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
         * Used for instances of {@link SynchronizedTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
        SYNCHRONIZED(SynchronizedTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
         * Used for instances of {@link ThrowTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
        THROW(ThrowTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
         * Used for instances of {@link TryTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
        TRY(TryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
         * Used for instances of {@link ParameterizedTypeTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
        PARAMETERIZED_TYPE(ParameterizedTypeTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        /**
9300
c2de4dd9853b 7033809: Rename "disjunctive" to "union" in javax.lang.model
darcy
parents: 8031
diff changeset
   285
         * Used for instances of {@link UnionTypeTree}.
5492
515e4b33b335 6943289: Project Coin: Improved Exception Handling for Java (aka 'multicatch')
mcimadamore
parents: 3149
diff changeset
   286
         */
9300
c2de4dd9853b 7033809: Rename "disjunctive" to "union" in javax.lang.model
darcy
parents: 8031
diff changeset
   287
        UNION_TYPE(UnionTypeTree.class),
5492
515e4b33b335 6943289: Project Coin: Improved Exception Handling for Java (aka 'multicatch')
mcimadamore
parents: 3149
diff changeset
   288
515e4b33b335 6943289: Project Coin: Improved Exception Handling for Java (aka 'multicatch')
mcimadamore
parents: 3149
diff changeset
   289
        /**
14725
65836e833f59 8002099: Add support for intersection types in cast expression
mcimadamore
parents: 14541
diff changeset
   290
         * Used for instances of {@link IntersectionTypeTree}.
65836e833f59 8002099: Add support for intersection types in cast expression
mcimadamore
parents: 14541
diff changeset
   291
         */
65836e833f59 8002099: Add support for intersection types in cast expression
mcimadamore
parents: 14541
diff changeset
   292
        INTERSECTION_TYPE(IntersectionTypeTree.class),
65836e833f59 8002099: Add support for intersection types in cast expression
mcimadamore
parents: 14541
diff changeset
   293
65836e833f59 8002099: Add support for intersection types in cast expression
mcimadamore
parents: 14541
diff changeset
   294
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
         * Used for instances of {@link TypeCastTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   296
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   297
        TYPE_CAST(TypeCastTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   298
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   300
         * Used for instances of {@link TypeParameterTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   301
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   302
        TYPE_PARAMETER(TypeParameterTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
06bc494ca11e Initial load
duke
parents:
diff changeset
   304
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
         * Used for instances of {@link VariableTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
        VARIABLE(VariableTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   310
         * Used for instances of {@link WhileLoopTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   311
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
        WHILE_LOOP(WhileLoopTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
         * Used for instances of {@link UnaryTree} representing postfix
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
         * increment operator {@code ++}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
        POSTFIX_INCREMENT(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   319
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
         * Used for instances of {@link UnaryTree} representing postfix
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
         * decrement operator {@code --}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   323
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
        POSTFIX_DECREMENT(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   325
06bc494ca11e Initial load
duke
parents:
diff changeset
   326
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   327
         * Used for instances of {@link UnaryTree} representing prefix
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
         * increment operator {@code ++}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   329
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
        PREFIX_INCREMENT(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
         * Used for instances of {@link UnaryTree} representing prefix
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
         * decrement operator {@code --}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   335
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
        PREFIX_DECREMENT(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   339
         * Used for instances of {@link UnaryTree} representing unary plus
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
         * operator {@code +}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   341
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
        UNARY_PLUS(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   343
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   345
         * Used for instances of {@link UnaryTree} representing unary minus
06bc494ca11e Initial load
duke
parents:
diff changeset
   346
         * operator {@code -}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
        UNARY_MINUS(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   349
06bc494ca11e Initial load
duke
parents:
diff changeset
   350
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
         * Used for instances of {@link UnaryTree} representing bitwise
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
         * complement operator {@code ~}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   353
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
        BITWISE_COMPLEMENT(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   355
06bc494ca11e Initial load
duke
parents:
diff changeset
   356
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   357
         * Used for instances of {@link UnaryTree} representing logical
06bc494ca11e Initial load
duke
parents:
diff changeset
   358
         * complement operator {@code !}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   359
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   360
        LOGICAL_COMPLEMENT(UnaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   361
06bc494ca11e Initial load
duke
parents:
diff changeset
   362
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   364
         * multiplication {@code *}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   365
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   366
        MULTIPLY(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   367
06bc494ca11e Initial load
duke
parents:
diff changeset
   368
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   369
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   370
         * division {@code /}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   371
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   372
        DIVIDE(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   373
06bc494ca11e Initial load
duke
parents:
diff changeset
   374
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   375
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   376
         * remainder {@code %}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   377
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   378
        REMAINDER(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   379
06bc494ca11e Initial load
duke
parents:
diff changeset
   380
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   381
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   382
         * addition or string concatenation {@code +}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   383
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   384
        PLUS(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   385
06bc494ca11e Initial load
duke
parents:
diff changeset
   386
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   387
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   388
         * subtraction {@code -}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   389
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   390
        MINUS(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   391
06bc494ca11e Initial load
duke
parents:
diff changeset
   392
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   393
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   394
         * left shift {@code <<}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   395
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   396
        LEFT_SHIFT(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   397
06bc494ca11e Initial load
duke
parents:
diff changeset
   398
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   399
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   400
         * right shift {@code >>}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   401
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   402
        RIGHT_SHIFT(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   403
06bc494ca11e Initial load
duke
parents:
diff changeset
   404
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   405
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   406
         * unsigned right shift {@code >>>}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   407
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   408
        UNSIGNED_RIGHT_SHIFT(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   409
06bc494ca11e Initial load
duke
parents:
diff changeset
   410
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   411
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   412
         * less-than {@code <}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   413
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   414
        LESS_THAN(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   415
06bc494ca11e Initial load
duke
parents:
diff changeset
   416
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   417
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   418
         * greater-than {@code >}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   419
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   420
        GREATER_THAN(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   421
06bc494ca11e Initial load
duke
parents:
diff changeset
   422
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   423
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   424
         * less-than-equal {@code <=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   425
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   426
        LESS_THAN_EQUAL(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   427
06bc494ca11e Initial load
duke
parents:
diff changeset
   428
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   429
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   430
         * greater-than-equal {@code >=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   431
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   432
        GREATER_THAN_EQUAL(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   433
06bc494ca11e Initial load
duke
parents:
diff changeset
   434
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   435
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   436
         * equal-to {@code ==}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   437
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
        EQUAL_TO(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   439
06bc494ca11e Initial load
duke
parents:
diff changeset
   440
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   441
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   442
         * not-equal-to {@code !=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   443
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   444
        NOT_EQUAL_TO(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   445
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   447
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   448
         * bitwise and logical "and" {@code &}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   449
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   450
        AND(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   451
06bc494ca11e Initial load
duke
parents:
diff changeset
   452
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   453
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   454
         * bitwise and logical "xor" {@code ^}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   455
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   456
        XOR(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   457
06bc494ca11e Initial load
duke
parents:
diff changeset
   458
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   459
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   460
         * bitwise and logical "or" {@code |}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   461
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   462
        OR(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   463
06bc494ca11e Initial load
duke
parents:
diff changeset
   464
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   465
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   466
         * conditional-and {@code &&}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   467
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   468
        CONDITIONAL_AND(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   469
06bc494ca11e Initial load
duke
parents:
diff changeset
   470
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   471
         * Used for instances of {@link BinaryTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   472
         * conditional-or {@code ||}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   473
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   474
        CONDITIONAL_OR(BinaryTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   475
06bc494ca11e Initial load
duke
parents:
diff changeset
   476
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   477
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   478
         * multiplication assignment {@code *=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   479
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   480
        MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   481
06bc494ca11e Initial load
duke
parents:
diff changeset
   482
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   483
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   484
         * division assignment {@code /=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   485
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   486
        DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   487
06bc494ca11e Initial load
duke
parents:
diff changeset
   488
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   489
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   490
         * remainder assignment {@code %=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   491
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   492
        REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   493
06bc494ca11e Initial load
duke
parents:
diff changeset
   494
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   495
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   496
         * addition or string concatenation assignment {@code +=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   497
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   498
        PLUS_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   499
06bc494ca11e Initial load
duke
parents:
diff changeset
   500
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   501
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   502
         * subtraction assignment {@code -=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   503
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   504
        MINUS_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   505
06bc494ca11e Initial load
duke
parents:
diff changeset
   506
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   507
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   508
         * left shift assignment {@code <<=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   509
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   510
        LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   511
06bc494ca11e Initial load
duke
parents:
diff changeset
   512
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   513
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   514
         * right shift assignment {@code >>=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   515
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   516
        RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   517
06bc494ca11e Initial load
duke
parents:
diff changeset
   518
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   519
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   520
         * unsigned right shift assignment {@code >>>=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   521
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   522
        UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   523
06bc494ca11e Initial load
duke
parents:
diff changeset
   524
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   525
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   526
         * bitwise and logical "and" assignment {@code &=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   527
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   528
        AND_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   529
06bc494ca11e Initial load
duke
parents:
diff changeset
   530
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   531
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   532
         * bitwise and logical "xor" assignment {@code ^=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   533
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   534
        XOR_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   535
06bc494ca11e Initial load
duke
parents:
diff changeset
   536
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   537
         * Used for instances of {@link CompoundAssignmentTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   538
         * bitwise and logical "or" assignment {@code |=}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   539
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   540
        OR_ASSIGNMENT(CompoundAssignmentTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   541
06bc494ca11e Initial load
duke
parents:
diff changeset
   542
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   543
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   544
         * an integral literal expression of type {@code int}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   545
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   546
        INT_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   547
06bc494ca11e Initial load
duke
parents:
diff changeset
   548
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   549
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   550
         * an integral literal expression of type {@code long}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   551
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   552
        LONG_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   553
06bc494ca11e Initial load
duke
parents:
diff changeset
   554
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   555
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   556
         * a floating-point literal expression of type {@code float}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   557
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   558
        FLOAT_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   559
06bc494ca11e Initial load
duke
parents:
diff changeset
   560
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   561
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   562
         * a floating-point literal expression of type {@code double}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   563
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   564
        DOUBLE_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   565
06bc494ca11e Initial load
duke
parents:
diff changeset
   566
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   567
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   568
         * a boolean literal expression of type {@code boolean}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   569
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   570
        BOOLEAN_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   571
06bc494ca11e Initial load
duke
parents:
diff changeset
   572
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   573
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   574
         * a character literal expression of type {@code char}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   575
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   576
        CHAR_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   577
06bc494ca11e Initial load
duke
parents:
diff changeset
   578
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   579
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   580
         * a string literal expression of type {@link String}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   581
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   582
        STRING_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   583
06bc494ca11e Initial load
duke
parents:
diff changeset
   584
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   585
         * Used for instances of {@link LiteralTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   586
         * the use of {@code null}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   587
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   588
        NULL_LITERAL(LiteralTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   589
06bc494ca11e Initial load
duke
parents:
diff changeset
   590
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   591
         * Used for instances of {@link WildcardTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   592
         * an unbounded wildcard type argument.
06bc494ca11e Initial load
duke
parents:
diff changeset
   593
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   594
        UNBOUNDED_WILDCARD(WildcardTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   595
06bc494ca11e Initial load
duke
parents:
diff changeset
   596
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   597
         * Used for instances of {@link WildcardTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   598
         * an extends bounded wildcard type argument.
06bc494ca11e Initial load
duke
parents:
diff changeset
   599
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   600
        EXTENDS_WILDCARD(WildcardTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   601
06bc494ca11e Initial load
duke
parents:
diff changeset
   602
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   603
         * Used for instances of {@link WildcardTree} representing
06bc494ca11e Initial load
duke
parents:
diff changeset
   604
         * a super bounded wildcard type argument.
06bc494ca11e Initial load
duke
parents:
diff changeset
   605
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   606
        SUPER_WILDCARD(WildcardTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   607
06bc494ca11e Initial load
duke
parents:
diff changeset
   608
        /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   609
         * Used for instances of {@link ErroneousTree}.
06bc494ca11e Initial load
duke
parents:
diff changeset
   610
         */
06bc494ca11e Initial load
duke
parents:
diff changeset
   611
        ERRONEOUS(ErroneousTree.class),
06bc494ca11e Initial load
duke
parents:
diff changeset
   612
06bc494ca11e Initial load
duke
parents:
diff changeset
   613
        /**
6580
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   614
         * Used for instances of {@link ClassTree} representing interfaces.
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   615
         */
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   616
        INTERFACE(ClassTree.class),
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   617
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   618
        /**
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   619
         * Used for instances of {@link ClassTree} representing enums.
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   620
         */
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   621
        ENUM(ClassTree.class),
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   622
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   623
        /**
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   624
         * Used for instances of {@link ClassTree} representing annotation types.
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   625
         */
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   626
        ANNOTATION_TYPE(ClassTree.class),
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   627
d3d578d22cc7 6570730: com.sun.source.tree.ModifiersTree.getFlags() should return class type
jjg
parents: 5848
diff changeset
   628
        /**
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   629
         * Used for instances of {@link ModuleTree} representing module declarations.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   630
         */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   631
        MODULE(ModuleTree.class),
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   632
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   633
        /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   634
         * Used for instances of {@link ExportsTree} representing
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   635
         * exports directives in a module declaration.
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   636
         */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   637
        EXPORTS(ExportsTree.class),
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   638
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   639
        /**
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   640
         * Used for instances of {@link ExportsTree} representing
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   641
         * opens directives in a module declaration.
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   642
         */
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   643
        OPENS(OpensTree.class),
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   644
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   645
        /**
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   646
         * Used for instances of {@link ProvidesTree} representing
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   647
         * provides directives in a module declaration.
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   648
         */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   649
        PROVIDES(ProvidesTree.class),
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   650
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   651
        /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   652
         * Used for instances of {@link RequiresTree} representing
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   653
         * requires directives in a module declaration.
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   654
         */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   655
        REQUIRES(RequiresTree.class),
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   656
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   657
        /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   658
         * Used for instances of {@link UsesTree} representing
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   659
         * uses directives in a module declaration.
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   660
         */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   661
        USES(UsesTree.class),
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   662
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   663
        /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   664
         * An implementation-reserved node. This is the not the node
06bc494ca11e Initial load
duke
parents:
diff changeset
   665
         * you are looking for.
06bc494ca11e Initial load
duke
parents:
diff changeset
   666
         */
55306
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   667
        OTHER(null),
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   668
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   669
        /**
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   670
         * Used for instances of {@link YieldTree}.
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   671
         *
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   672
         * @since 13
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   673
         */
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   674
        YIELD(YieldTree.class);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   675
06bc494ca11e Initial load
duke
parents:
diff changeset
   676
06bc494ca11e Initial load
duke
parents:
diff changeset
   677
        Kind(Class<? extends Tree> intf) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   678
            associatedInterface = intf;
06bc494ca11e Initial load
duke
parents:
diff changeset
   679
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   680
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   681
        /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   682
         * Returns the associated interface type that uses this kind.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   683
         * @return the associated interface
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   684
         */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   685
        public Class<? extends Tree> asInterface() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   686
            return associatedInterface;
06bc494ca11e Initial load
duke
parents:
diff changeset
   687
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   688
06bc494ca11e Initial load
duke
parents:
diff changeset
   689
        private final Class<? extends Tree> associatedInterface;
06bc494ca11e Initial load
duke
parents:
diff changeset
   690
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   691
06bc494ca11e Initial load
duke
parents:
diff changeset
   692
    /**
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   693
     * Returns the kind of this tree.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   694
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   695
     * @return the kind of this tree.
06bc494ca11e Initial load
duke
parents:
diff changeset
   696
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   697
    Kind getKind();
06bc494ca11e Initial load
duke
parents:
diff changeset
   698
06bc494ca11e Initial load
duke
parents:
diff changeset
   699
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   700
     * Accept method used to implement the visitor pattern.  The
06bc494ca11e Initial load
duke
parents:
diff changeset
   701
     * visitor pattern is used to implement operations on trees.
06bc494ca11e Initial load
duke
parents:
diff changeset
   702
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   703
     * @param <R> result type of this operation.
14541
36f9d11fc9aa 7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents: 11142
diff changeset
   704
     * @param <D> type of additional data.
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   705
     * @param visitor the visitor to be called
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   706
     * @param data a value to be passed to the visitor
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   707
     * @return the result returned from calling the visitor
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   708
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   709
    <R,D> R accept(TreeVisitor<R,D> visitor, D data);
06bc494ca11e Initial load
duke
parents:
diff changeset
   710
}