src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.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
 * A visitor of trees, in the style of the visitor design pattern.
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 * Classes implementing this interface are used to operate
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
 * on a tree when the kind of tree is unknown at compile time.
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
 * When a visitor is passed to an tree's {@link Tree#accept
44878
9dd9cf7919ff 8179299: Fix HTML 5 errors in java.compiler module
jjg
parents: 42407
diff changeset
    33
 * accept} method, the <code>visit<i>Xyz</i></code> method most applicable
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
 * to that tree is invoked.
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * <p> Classes implementing this interface may or may not throw a
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * {@code NullPointerException} if the additional parameter {@code p}
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * is {@code null}; see documentation of the implementing class for
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * details.
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 * <p> <b>WARNING:</b> It is possible that methods will be added to
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * this interface to accommodate new, currently unknown, language
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * structures added to future versions of the Java&trade; programming
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * language.  Therefore, visitor classes directly implementing this
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 * interface may be source incompatible with future versions of the
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 * platform.
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 * @param <R> the return type of this visitor's methods.  Use {@link
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
 *            Void} for visitors that do not need to return results.
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
 * @param <P> the type of the additional parameter to this visitor's
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
 *            methods.  Use {@code Void} for visitors that do not need an
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
 *            additional parameter.
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
 * @author Peter von der Ah&eacute;
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
 * @author Jonathan Gibbons
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
 * @since 1.6
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
public interface TreeVisitor<R,P> {
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    60
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    61
     * Visits an AnnotatedTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    62
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    63
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    64
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    65
     */
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14725
diff changeset
    66
    R visitAnnotatedType(AnnotatedTypeTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    67
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    68
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    69
     * Visits an AnnotatedTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    70
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    71
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    72
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    73
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    R visitAnnotation(AnnotationTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    75
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    76
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    77
     * Visits a MethodInvocationTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    78
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    79
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    80
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    81
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
    R visitMethodInvocation(MethodInvocationTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    83
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    84
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    85
     * Visits an AssertTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    86
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    87
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    88
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    89
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
    R visitAssert(AssertTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    91
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    92
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    93
     * Visits an AssignmentTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    94
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    95
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    96
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    97
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
    R visitAssignment(AssignmentTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
    99
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   100
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   101
     * Visits a CompoundAssignmentTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   102
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   103
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   104
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   105
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
    R visitCompoundAssignment(CompoundAssignmentTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   107
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   108
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   109
     * Visits a BinaryTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   110
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   111
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   112
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   113
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
    R visitBinary(BinaryTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   115
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   116
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   117
     * Visits a BlockTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   118
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   119
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   120
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   121
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
    R visitBlock(BlockTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   123
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   124
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   125
     * Visits a BreakTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   126
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   127
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   128
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   129
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
    R visitBreak(BreakTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   131
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   132
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   133
     * Visits a CaseTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   134
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   135
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   136
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   137
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
    R visitCase(CaseTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   139
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   140
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   141
     * Visits a CatchTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   142
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   143
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   144
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   145
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
    R visitCatch(CatchTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   147
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   148
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   149
     * Visits a ClassTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   150
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   151
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   152
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   153
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
    R visitClass(ClassTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   155
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   156
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   157
     * Visits a ConditionalExpressionTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   158
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   159
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   160
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   161
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
    R visitConditionalExpression(ConditionalExpressionTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   163
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   164
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   165
     * Visits a ContinueTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   166
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   167
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   168
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   169
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
    R visitContinue(ContinueTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   171
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   172
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   173
     * Visits a DoWhileTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   174
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   175
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   176
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   177
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
    R visitDoWhileLoop(DoWhileLoopTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   179
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   180
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   181
     * Visits an ErroneousTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   182
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   183
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   184
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   185
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
    R visitErroneous(ErroneousTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   187
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   188
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   189
     * Visits an ExpressionStatementTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   190
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   191
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   192
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   193
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
    R visitExpressionStatement(ExpressionStatementTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   195
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   196
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   197
     * Visits an EnhancedForLoopTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   198
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   199
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   200
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   201
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
    R visitEnhancedForLoop(EnhancedForLoopTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   203
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   204
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   205
     * Visits a ForLoopTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   206
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   207
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   208
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   209
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
    R visitForLoop(ForLoopTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   211
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   212
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   213
     * Visits an IdentifierTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   214
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   215
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   216
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   217
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
    R visitIdentifier(IdentifierTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   219
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   220
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   221
     * Visits an IfTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   222
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   223
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   224
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   225
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
    R visitIf(IfTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   227
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   228
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   229
     * Visits an ImportTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   230
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   231
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   232
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   233
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
    R visitImport(ImportTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   235
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   236
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   237
     * Visits an ArrayAccessTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   238
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   239
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   240
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   241
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
    R visitArrayAccess(ArrayAccessTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   243
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   244
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   245
     * Visits a LabeledStatementTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   246
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   247
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   248
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   249
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
    R visitLabeledStatement(LabeledStatementTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   251
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   252
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   253
     * Visits a LiteralTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   254
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   255
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   256
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   257
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
    R visitLiteral(LiteralTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   259
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   260
    /**
59285
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   261
     * {@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
   262
     *           the Java language.
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   263
     *
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   264
     *           This method 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
   265
     *           feature of the Java language. Preview features
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   266
     *           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
   267
     *           features of the Java language.}
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   268
     *
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   269
     * Visits an BindingPattern node.
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   270
     * @param node the node being visited
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   271
     * @param p a parameter value
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   272
     * @return a result value
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   273
     * @since 14
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   274
     */
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   275
    R visitBindingPattern(BindingPatternTree node, P p);
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   276
7799a51dbe30 8231826: Implement javac changes for pattern matching for instanceof
jlahoda
parents: 59021
diff changeset
   277
    /**
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   278
     * Visits a MethodTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   279
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   280
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   281
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   282
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
    R visitMethod(MethodTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   284
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   285
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   286
     * Visits a ModifiersTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   287
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   288
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   289
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   290
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
    R visitModifiers(ModifiersTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   292
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   293
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   294
     * Visits a NewArrayTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   295
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   296
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   297
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   298
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
    R visitNewArray(NewArrayTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   300
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   301
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   302
     * Visits a NewClassTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   303
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   304
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   305
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   306
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
    R visitNewClass(NewClassTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   308
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   309
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   310
     * Visits a LambdaExpressionTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   311
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   312
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   313
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   314
     */
11141
7d112a1ecd0f 7115046: Add AST node for lambda expressions
mcimadamore
parents: 9300
diff changeset
   315
    R visitLambdaExpression(LambdaExpressionTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   316
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   317
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   318
     * Visits a PackageTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   319
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   320
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   321
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   322
     */
24069
dfb8f11542fc 8034245: Refactor TopLevel tree node.
pgovereau
parents: 20612
diff changeset
   323
    R visitPackage(PackageTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   324
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   325
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   326
     * Visits a ParenthesizedTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   327
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   328
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   329
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   330
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
    R visitParenthesized(ParenthesizedTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   332
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   333
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   334
     * Visits a ReturnTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   335
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   336
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   337
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   338
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   339
    R visitReturn(ReturnTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   340
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   341
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   342
     * Visits a MemberSelectTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   343
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   344
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   345
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   346
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
    R visitMemberSelect(MemberSelectTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   348
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   349
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   350
     * Visits a MemberReferenceTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   351
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   352
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   353
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   354
     */
11142
45d0ec1e7463 7115049: Add AST node for method references
mcimadamore
parents: 11141
diff changeset
   355
    R visitMemberReference(MemberReferenceTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   356
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   357
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   358
     * Visits an EmptyStatementTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   359
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   360
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   361
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   362
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
    R visitEmptyStatement(EmptyStatementTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   364
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   365
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   366
     * Visits a SwitchTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   367
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   368
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   369
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   370
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   371
    R visitSwitch(SwitchTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   372
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   373
    /**
51563
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   374
     * Visits a SwitchExpressionTree node.
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   375
     *
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   376
     * @param node the node being visited
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   377
     * @param p a parameter value
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   378
     * @return a result value
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   379
     * @since 12
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   380
     */
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   381
    R visitSwitchExpression(SwitchExpressionTree node, P p);
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   382
de411d537aae 8206986: Compiler support for Switch Expressions (Preview)
jlahoda
parents: 47216
diff changeset
   383
    /**
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   384
     * Visits a SynchronizedTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   385
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   386
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   387
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   388
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   389
    R visitSynchronized(SynchronizedTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   390
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   391
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   392
     * Visits a ThrowTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   393
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   394
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   395
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   396
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   397
    R visitThrow(ThrowTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   398
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   399
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   400
     * Visits a CompilationUnitTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   401
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   402
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   403
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   404
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   405
    R visitCompilationUnit(CompilationUnitTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   406
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   407
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   408
     * Visits a TryTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   409
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   410
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   411
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   412
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   413
    R visitTry(TryTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   414
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   415
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   416
     * Visits a ParameterizedTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   417
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   418
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   419
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   420
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   421
    R visitParameterizedType(ParameterizedTypeTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   422
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   423
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   424
     * Visits a UnionTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   425
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   426
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   427
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   428
     */
9300
c2de4dd9853b 7033809: Rename "disjunctive" to "union" in javax.lang.model
darcy
parents: 8031
diff changeset
   429
    R visitUnionType(UnionTypeTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   430
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   431
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   432
     * Visits an IntersectionTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   433
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   434
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   435
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   436
     */
14725
65836e833f59 8002099: Add support for intersection types in cast expression
mcimadamore
parents: 11142
diff changeset
   437
    R visitIntersectionType(IntersectionTypeTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   438
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   439
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   440
     * Visits an ArrayTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   441
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   442
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   443
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   444
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   445
    R visitArrayType(ArrayTypeTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   446
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   447
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   448
     * Visits a TypeCastTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   449
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   450
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   451
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   452
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   453
    R visitTypeCast(TypeCastTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   454
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   455
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   456
     * Visits a PrimitiveTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   457
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   458
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   459
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   460
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   461
    R visitPrimitiveType(PrimitiveTypeTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   462
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   463
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   464
     * Visits a TypeParameterTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   465
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   466
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   467
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   468
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   469
    R visitTypeParameter(TypeParameterTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   470
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   471
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   472
     * Visits an InstanceOfTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   473
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   474
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   475
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   476
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   477
    R visitInstanceOf(InstanceOfTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   478
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   479
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   480
     * Visits a UnaryTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   481
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   482
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   483
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   484
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   485
    R visitUnary(UnaryTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   486
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   487
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   488
     * Visits a VariableTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   489
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   490
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   491
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   492
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   493
    R visitVariable(VariableTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   494
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   495
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   496
     * Visits a WhileLoopTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   497
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   498
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   499
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   500
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   501
    R visitWhileLoop(WhileLoopTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   502
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   503
    /**
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   504
     * Visits a WildcardTypeTree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   505
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   506
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   507
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   508
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   509
    R visitWildcard(WildcardTree node, P p);
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   510
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   511
    /**
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   512
     * Visits a ModuleTree node.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   513
     * @param node the node being visited
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   514
     * @param p a parameter value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   515
     * @return a result value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   516
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   517
    R visitModule(ModuleTree node, P p);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   518
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   519
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   520
     * Visits an ExportsTree node.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   521
     * @param node the node being visited
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   522
     * @param p a parameter value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   523
     * @return a result value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   524
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   525
    R visitExports(ExportsTree node, P p);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   527
    /**
42407
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   528
     * Visits an OpensTree node.
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   529
     * @param node the node being visited
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   530
     * @param p a parameter value
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   531
     * @return a result value
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   532
     */
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   533
    R visitOpens(OpensTree node, P p);
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   534
f3702cff2933 8169069: Module system implementation refresh (11/2016)
alanb
parents: 36526
diff changeset
   535
    /**
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   536
     * Visits a ProvidesTree node.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   537
     * @param node the node being visited
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   538
     * @param p a parameter value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   539
     * @return a result value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   540
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   541
    R visitProvides(ProvidesTree node, P p);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   542
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   543
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   544
     * Visits a RequiresTree node.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   545
     * @param node the node being visited
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   546
     * @param p a parameter value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   547
     * @return a result value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   548
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   549
    R visitRequires(RequiresTree node, P p);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   550
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   551
    /**
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   552
     * Visits a UsesTree node.
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   553
     * @param node the node being visited
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   554
     * @param p a parameter value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   555
     * @return a result value
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   556
     */
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   557
    R visitUses(UsesTree node, P p);
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   558
3b41f1c69604 8142968: Module System implementation
alanb
parents: 34916
diff changeset
   559
    /**
25287
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   560
     * Visits an unknown type of Tree node.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   561
     * This can occur if the language evolves and new kinds
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   562
     * of nodes are added to the {@code Tree} hierarchy.
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   563
     * @param node the node being visited
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   564
     * @param p a parameter value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   565
     * @return a result value
d2440361b323 8046614: Fill in missing doc comments
jjg
parents: 24069
diff changeset
   566
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   567
    R visitOther(Tree node, P p);
55306
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   568
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   569
    /**
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   570
     * Visits a YieldTree node.
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   571
     * @param node the node being visited
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   572
     * @param p a parameter value
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   573
     * @return a result value
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   574
     * @since 13
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   575
     */
ea43db53de91 8223305: Compiler support for Switch Expressions
jlahoda
parents: 51563
diff changeset
   576
    R visitYield(YieldTree node, P p);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   577
}