author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 59285 | 7799a51dbe30 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
55306 | 2 |
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
26 |
package com.sun.source.tree; |
|
27 |
||
28 |
/** |
|
29 |
* A visitor of trees, in the style of the visitor design pattern. |
|
30 |
* Classes implementing this interface are used to operate |
|
31 |
* on a tree when the kind of tree is unknown at compile time. |
|
32 |
* When a visitor is passed to an tree's {@link Tree#accept |
|
44878 | 33 |
* accept} method, the <code>visit<i>Xyz</i></code> method most applicable |
10 | 34 |
* to that tree is invoked. |
35 |
* |
|
36 |
* <p> Classes implementing this interface may or may not throw a |
|
37 |
* {@code NullPointerException} if the additional parameter {@code p} |
|
38 |
* is {@code null}; see documentation of the implementing class for |
|
39 |
* details. |
|
40 |
* |
|
41 |
* <p> <b>WARNING:</b> It is possible that methods will be added to |
|
42 |
* this interface to accommodate new, currently unknown, language |
|
43 |
* structures added to future versions of the Java™ programming |
|
44 |
* language. Therefore, visitor classes directly implementing this |
|
45 |
* interface may be source incompatible with future versions of the |
|
46 |
* platform. |
|
47 |
* |
|
48 |
* @param <R> the return type of this visitor's methods. Use {@link |
|
49 |
* Void} for visitors that do not need to return results. |
|
50 |
* @param <P> the type of the additional parameter to this visitor's |
|
51 |
* methods. Use {@code Void} for visitors that do not need an |
|
52 |
* additional parameter. |
|
53 |
* |
|
54 |
* @author Peter von der Ahé |
|
55 |
* @author Jonathan Gibbons |
|
56 |
* |
|
57 |
* @since 1.6 |
|
58 |
*/ |
|
59 |
public interface TreeVisitor<R,P> { |
|
25287 | 60 |
/** |
61 |
* Visits an AnnotatedTypeTree node. |
|
62 |
* @param node the node being visited |
|
63 |
* @param p a parameter value |
|
64 |
* @return a result value |
|
65 |
*/ |
|
15385 | 66 |
R visitAnnotatedType(AnnotatedTypeTree node, P p); |
25287 | 67 |
|
68 |
/** |
|
69 |
* Visits an AnnotatedTree node. |
|
70 |
* @param node the node being visited |
|
71 |
* @param p a parameter value |
|
72 |
* @return a result value |
|
73 |
*/ |
|
10 | 74 |
R visitAnnotation(AnnotationTree node, P p); |
25287 | 75 |
|
76 |
/** |
|
77 |
* Visits a MethodInvocationTree node. |
|
78 |
* @param node the node being visited |
|
79 |
* @param p a parameter value |
|
80 |
* @return a result value |
|
81 |
*/ |
|
10 | 82 |
R visitMethodInvocation(MethodInvocationTree node, P p); |
25287 | 83 |
|
84 |
/** |
|
85 |
* Visits an AssertTree node. |
|
86 |
* @param node the node being visited |
|
87 |
* @param p a parameter value |
|
88 |
* @return a result value |
|
89 |
*/ |
|
10 | 90 |
R visitAssert(AssertTree node, P p); |
25287 | 91 |
|
92 |
/** |
|
93 |
* Visits an AssignmentTree node. |
|
94 |
* @param node the node being visited |
|
95 |
* @param p a parameter value |
|
96 |
* @return a result value |
|
97 |
*/ |
|
10 | 98 |
R visitAssignment(AssignmentTree node, P p); |
25287 | 99 |
|
100 |
/** |
|
101 |
* Visits a CompoundAssignmentTree node. |
|
102 |
* @param node the node being visited |
|
103 |
* @param p a parameter value |
|
104 |
* @return a result value |
|
105 |
*/ |
|
10 | 106 |
R visitCompoundAssignment(CompoundAssignmentTree node, P p); |
25287 | 107 |
|
108 |
/** |
|
109 |
* Visits a BinaryTree node. |
|
110 |
* @param node the node being visited |
|
111 |
* @param p a parameter value |
|
112 |
* @return a result value |
|
113 |
*/ |
|
10 | 114 |
R visitBinary(BinaryTree node, P p); |
25287 | 115 |
|
116 |
/** |
|
117 |
* Visits a BlockTree node. |
|
118 |
* @param node the node being visited |
|
119 |
* @param p a parameter value |
|
120 |
* @return a result value |
|
121 |
*/ |
|
10 | 122 |
R visitBlock(BlockTree node, P p); |
25287 | 123 |
|
124 |
/** |
|
125 |
* Visits a BreakTree node. |
|
126 |
* @param node the node being visited |
|
127 |
* @param p a parameter value |
|
128 |
* @return a result value |
|
129 |
*/ |
|
10 | 130 |
R visitBreak(BreakTree node, P p); |
25287 | 131 |
|
132 |
/** |
|
133 |
* Visits a CaseTree node. |
|
134 |
* @param node the node being visited |
|
135 |
* @param p a parameter value |
|
136 |
* @return a result value |
|
137 |
*/ |
|
10 | 138 |
R visitCase(CaseTree node, P p); |
25287 | 139 |
|
140 |
/** |
|
141 |
* Visits a CatchTree node. |
|
142 |
* @param node the node being visited |
|
143 |
* @param p a parameter value |
|
144 |
* @return a result value |
|
145 |
*/ |
|
10 | 146 |
R visitCatch(CatchTree node, P p); |
25287 | 147 |
|
148 |
/** |
|
149 |
* Visits a ClassTree node. |
|
150 |
* @param node the node being visited |
|
151 |
* @param p a parameter value |
|
152 |
* @return a result value |
|
153 |
*/ |
|
10 | 154 |
R visitClass(ClassTree node, P p); |
25287 | 155 |
|
156 |
/** |
|
157 |
* Visits a ConditionalExpressionTree node. |
|
158 |
* @param node the node being visited |
|
159 |
* @param p a parameter value |
|
160 |
* @return a result value |
|
161 |
*/ |
|
10 | 162 |
R visitConditionalExpression(ConditionalExpressionTree node, P p); |
25287 | 163 |
|
164 |
/** |
|
165 |
* Visits a ContinueTree node. |
|
166 |
* @param node the node being visited |
|
167 |
* @param p a parameter value |
|
168 |
* @return a result value |
|
169 |
*/ |
|
10 | 170 |
R visitContinue(ContinueTree node, P p); |
25287 | 171 |
|
172 |
/** |
|
173 |
* Visits a DoWhileTree node. |
|
174 |
* @param node the node being visited |
|
175 |
* @param p a parameter value |
|
176 |
* @return a result value |
|
177 |
*/ |
|
10 | 178 |
R visitDoWhileLoop(DoWhileLoopTree node, P p); |
25287 | 179 |
|
180 |
/** |
|
181 |
* Visits an ErroneousTree node. |
|
182 |
* @param node the node being visited |
|
183 |
* @param p a parameter value |
|
184 |
* @return a result value |
|
185 |
*/ |
|
10 | 186 |
R visitErroneous(ErroneousTree node, P p); |
25287 | 187 |
|
188 |
/** |
|
189 |
* Visits an ExpressionStatementTree node. |
|
190 |
* @param node the node being visited |
|
191 |
* @param p a parameter value |
|
192 |
* @return a result value |
|
193 |
*/ |
|
10 | 194 |
R visitExpressionStatement(ExpressionStatementTree node, P p); |
25287 | 195 |
|
196 |
/** |
|
197 |
* Visits an EnhancedForLoopTree node. |
|
198 |
* @param node the node being visited |
|
199 |
* @param p a parameter value |
|
200 |
* @return a result value |
|
201 |
*/ |
|
10 | 202 |
R visitEnhancedForLoop(EnhancedForLoopTree node, P p); |
25287 | 203 |
|
204 |
/** |
|
205 |
* Visits a ForLoopTree node. |
|
206 |
* @param node the node being visited |
|
207 |
* @param p a parameter value |
|
208 |
* @return a result value |
|
209 |
*/ |
|
10 | 210 |
R visitForLoop(ForLoopTree node, P p); |
25287 | 211 |
|
212 |
/** |
|
213 |
* Visits an IdentifierTree node. |
|
214 |
* @param node the node being visited |
|
215 |
* @param p a parameter value |
|
216 |
* @return a result value |
|
217 |
*/ |
|
10 | 218 |
R visitIdentifier(IdentifierTree node, P p); |
25287 | 219 |
|
220 |
/** |
|
221 |
* Visits an IfTree node. |
|
222 |
* @param node the node being visited |
|
223 |
* @param p a parameter value |
|
224 |
* @return a result value |
|
225 |
*/ |
|
10 | 226 |
R visitIf(IfTree node, P p); |
25287 | 227 |
|
228 |
/** |
|
229 |
* Visits an ImportTree node. |
|
230 |
* @param node the node being visited |
|
231 |
* @param p a parameter value |
|
232 |
* @return a result value |
|
233 |
*/ |
|
10 | 234 |
R visitImport(ImportTree node, P p); |
25287 | 235 |
|
236 |
/** |
|
237 |
* Visits an ArrayAccessTree node. |
|
238 |
* @param node the node being visited |
|
239 |
* @param p a parameter value |
|
240 |
* @return a result value |
|
241 |
*/ |
|
10 | 242 |
R visitArrayAccess(ArrayAccessTree node, P p); |
25287 | 243 |
|
244 |
/** |
|
245 |
* Visits a LabeledStatementTree node. |
|
246 |
* @param node the node being visited |
|
247 |
* @param p a parameter value |
|
248 |
* @return a result value |
|
249 |
*/ |
|
10 | 250 |
R visitLabeledStatement(LabeledStatementTree node, P p); |
25287 | 251 |
|
252 |
/** |
|
253 |
* Visits a LiteralTree node. |
|
254 |
* @param node the node being visited |
|
255 |
* @param p a parameter value |
|
256 |
* @return a result value |
|
257 |
*/ |
|
10 | 258 |
R visitLiteral(LiteralTree node, P p); |
25287 | 259 |
|
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 | 278 |
* Visits a MethodTree node. |
279 |
* @param node the node being visited |
|
280 |
* @param p a parameter value |
|
281 |
* @return a result value |
|
282 |
*/ |
|
10 | 283 |
R visitMethod(MethodTree node, P p); |
25287 | 284 |
|
285 |
/** |
|
286 |
* Visits a ModifiersTree node. |
|
287 |
* @param node the node being visited |
|
288 |
* @param p a parameter value |
|
289 |
* @return a result value |
|
290 |
*/ |
|
10 | 291 |
R visitModifiers(ModifiersTree node, P p); |
25287 | 292 |
|
293 |
/** |
|
294 |
* Visits a NewArrayTree node. |
|
295 |
* @param node the node being visited |
|
296 |
* @param p a parameter value |
|
297 |
* @return a result value |
|
298 |
*/ |
|
10 | 299 |
R visitNewArray(NewArrayTree node, P p); |
25287 | 300 |
|
301 |
/** |
|
302 |
* Visits a NewClassTree node. |
|
303 |
* @param node the node being visited |
|
304 |
* @param p a parameter value |
|
305 |
* @return a result value |
|
306 |
*/ |
|
10 | 307 |
R visitNewClass(NewClassTree node, P p); |
25287 | 308 |
|
309 |
/** |
|
310 |
* Visits a LambdaExpressionTree node. |
|
311 |
* @param node the node being visited |
|
312 |
* @param p a parameter value |
|
313 |
* @return a result value |
|
314 |
*/ |
|
11141 | 315 |
R visitLambdaExpression(LambdaExpressionTree node, P p); |
25287 | 316 |
|
317 |
/** |
|
318 |
* Visits a PackageTree node. |
|
319 |
* @param node the node being visited |
|
320 |
* @param p a parameter value |
|
321 |
* @return a result value |
|
322 |
*/ |
|
24069 | 323 |
R visitPackage(PackageTree node, P p); |
25287 | 324 |
|
325 |
/** |
|
326 |
* Visits a ParenthesizedTree node. |
|
327 |
* @param node the node being visited |
|
328 |
* @param p a parameter value |
|
329 |
* @return a result value |
|
330 |
*/ |
|
10 | 331 |
R visitParenthesized(ParenthesizedTree node, P p); |
25287 | 332 |
|
333 |
/** |
|
334 |
* Visits a ReturnTree node. |
|
335 |
* @param node the node being visited |
|
336 |
* @param p a parameter value |
|
337 |
* @return a result value |
|
338 |
*/ |
|
10 | 339 |
R visitReturn(ReturnTree node, P p); |
25287 | 340 |
|
341 |
/** |
|
342 |
* Visits a MemberSelectTree node. |
|
343 |
* @param node the node being visited |
|
344 |
* @param p a parameter value |
|
345 |
* @return a result value |
|
346 |
*/ |
|
10 | 347 |
R visitMemberSelect(MemberSelectTree node, P p); |
25287 | 348 |
|
349 |
/** |
|
350 |
* Visits a MemberReferenceTree node. |
|
351 |
* @param node the node being visited |
|
352 |
* @param p a parameter value |
|
353 |
* @return a result value |
|
354 |
*/ |
|
11142 | 355 |
R visitMemberReference(MemberReferenceTree node, P p); |
25287 | 356 |
|
357 |
/** |
|
358 |
* Visits an EmptyStatementTree node. |
|
359 |
* @param node the node being visited |
|
360 |
* @param p a parameter value |
|
361 |
* @return a result value |
|
362 |
*/ |
|
10 | 363 |
R visitEmptyStatement(EmptyStatementTree node, P p); |
25287 | 364 |
|
365 |
/** |
|
366 |
* Visits a SwitchTree node. |
|
367 |
* @param node the node being visited |
|
368 |
* @param p a parameter value |
|
369 |
* @return a result value |
|
370 |
*/ |
|
10 | 371 |
R visitSwitch(SwitchTree node, P p); |
25287 | 372 |
|
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 | 384 |
* Visits a SynchronizedTree node. |
385 |
* @param node the node being visited |
|
386 |
* @param p a parameter value |
|
387 |
* @return a result value |
|
388 |
*/ |
|
10 | 389 |
R visitSynchronized(SynchronizedTree node, P p); |
25287 | 390 |
|
391 |
/** |
|
392 |
* Visits a ThrowTree node. |
|
393 |
* @param node the node being visited |
|
394 |
* @param p a parameter value |
|
395 |
* @return a result value |
|
396 |
*/ |
|
10 | 397 |
R visitThrow(ThrowTree node, P p); |
25287 | 398 |
|
399 |
/** |
|
400 |
* Visits a CompilationUnitTree node. |
|
401 |
* @param node the node being visited |
|
402 |
* @param p a parameter value |
|
403 |
* @return a result value |
|
404 |
*/ |
|
10 | 405 |
R visitCompilationUnit(CompilationUnitTree node, P p); |
25287 | 406 |
|
407 |
/** |
|
408 |
* Visits a TryTree node. |
|
409 |
* @param node the node being visited |
|
410 |
* @param p a parameter value |
|
411 |
* @return a result value |
|
412 |
*/ |
|
10 | 413 |
R visitTry(TryTree node, P p); |
25287 | 414 |
|
415 |
/** |
|
416 |
* Visits a ParameterizedTypeTree node. |
|
417 |
* @param node the node being visited |
|
418 |
* @param p a parameter value |
|
419 |
* @return a result value |
|
420 |
*/ |
|
10 | 421 |
R visitParameterizedType(ParameterizedTypeTree node, P p); |
25287 | 422 |
|
423 |
/** |
|
424 |
* Visits a UnionTypeTree node. |
|
425 |
* @param node the node being visited |
|
426 |
* @param p a parameter value |
|
427 |
* @return a result value |
|
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 | 430 |
|
431 |
/** |
|
432 |
* Visits an IntersectionTypeTree node. |
|
433 |
* @param node the node being visited |
|
434 |
* @param p a parameter value |
|
435 |
* @return a result value |
|
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 | 438 |
|
439 |
/** |
|
440 |
* Visits an ArrayTypeTree node. |
|
441 |
* @param node the node being visited |
|
442 |
* @param p a parameter value |
|
443 |
* @return a result value |
|
444 |
*/ |
|
10 | 445 |
R visitArrayType(ArrayTypeTree node, P p); |
25287 | 446 |
|
447 |
/** |
|
448 |
* Visits a TypeCastTree node. |
|
449 |
* @param node the node being visited |
|
450 |
* @param p a parameter value |
|
451 |
* @return a result value |
|
452 |
*/ |
|
10 | 453 |
R visitTypeCast(TypeCastTree node, P p); |
25287 | 454 |
|
455 |
/** |
|
456 |
* Visits a PrimitiveTypeTree node. |
|
457 |
* @param node the node being visited |
|
458 |
* @param p a parameter value |
|
459 |
* @return a result value |
|
460 |
*/ |
|
10 | 461 |
R visitPrimitiveType(PrimitiveTypeTree node, P p); |
25287 | 462 |
|
463 |
/** |
|
464 |
* Visits a TypeParameterTree node. |
|
465 |
* @param node the node being visited |
|
466 |
* @param p a parameter value |
|
467 |
* @return a result value |
|
468 |
*/ |
|
10 | 469 |
R visitTypeParameter(TypeParameterTree node, P p); |
25287 | 470 |
|
471 |
/** |
|
472 |
* Visits an InstanceOfTree node. |
|
473 |
* @param node the node being visited |
|
474 |
* @param p a parameter value |
|
475 |
* @return a result value |
|
476 |
*/ |
|
10 | 477 |
R visitInstanceOf(InstanceOfTree node, P p); |
25287 | 478 |
|
479 |
/** |
|
480 |
* Visits a UnaryTree node. |
|
481 |
* @param node the node being visited |
|
482 |
* @param p a parameter value |
|
483 |
* @return a result value |
|
484 |
*/ |
|
10 | 485 |
R visitUnary(UnaryTree node, P p); |
25287 | 486 |
|
487 |
/** |
|
488 |
* Visits a VariableTree node. |
|
489 |
* @param node the node being visited |
|
490 |
* @param p a parameter value |
|
491 |
* @return a result value |
|
492 |
*/ |
|
10 | 493 |
R visitVariable(VariableTree node, P p); |
25287 | 494 |
|
495 |
/** |
|
496 |
* Visits a WhileLoopTree node. |
|
497 |
* @param node the node being visited |
|
498 |
* @param p a parameter value |
|
499 |
* @return a result value |
|
500 |
*/ |
|
10 | 501 |
R visitWhileLoop(WhileLoopTree node, P p); |
25287 | 502 |
|
503 |
/** |
|
504 |
* Visits a WildcardTypeTree node. |
|
505 |
* @param node the node being visited |
|
506 |
* @param p a parameter value |
|
507 |
* @return a result value |
|
508 |
*/ |
|
10 | 509 |
R visitWildcard(WildcardTree node, P p); |
25287 | 510 |
|
511 |
/** |
|
36526 | 512 |
* Visits a ModuleTree node. |
513 |
* @param node the node being visited |
|
514 |
* @param p a parameter value |
|
515 |
* @return a result value |
|
516 |
*/ |
|
517 |
R visitModule(ModuleTree node, P p); |
|
518 |
||
519 |
/** |
|
520 |
* Visits an ExportsTree node. |
|
521 |
* @param node the node being visited |
|
522 |
* @param p a parameter value |
|
523 |
* @return a result value |
|
524 |
*/ |
|
525 |
R visitExports(ExportsTree node, P p); |
|
526 |
||
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 | 536 |
* Visits a ProvidesTree node. |
537 |
* @param node the node being visited |
|
538 |
* @param p a parameter value |
|
539 |
* @return a result value |
|
540 |
*/ |
|
541 |
R visitProvides(ProvidesTree node, P p); |
|
542 |
||
543 |
/** |
|
544 |
* Visits a RequiresTree node. |
|
545 |
* @param node the node being visited |
|
546 |
* @param p a parameter value |
|
547 |
* @return a result value |
|
548 |
*/ |
|
549 |
R visitRequires(RequiresTree node, P p); |
|
550 |
||
551 |
/** |
|
552 |
* Visits a UsesTree node. |
|
553 |
* @param node the node being visited |
|
554 |
* @param p a parameter value |
|
555 |
* @return a result value |
|
556 |
*/ |
|
557 |
R visitUses(UsesTree node, P p); |
|
558 |
||
559 |
/** |
|
25287 | 560 |
* Visits an unknown type of Tree node. |
561 |
* This can occur if the language evolves and new kinds |
|
562 |
* of nodes are added to the {@code Tree} hierarchy. |
|
563 |
* @param node the node being visited |
|
564 |
* @param p a parameter value |
|
565 |
* @return a result value |
|
566 |
*/ |
|
10 | 567 |
R visitOther(Tree node, P p); |
55306 | 568 |
|
569 |
/** |
|
570 |
* Visits a YieldTree node. |
|
571 |
* @param node the node being visited |
|
572 |
* @param p a parameter value |
|
573 |
* @return a result value |
|
574 |
* @since 13 |
|
575 |
*/ |
|
576 |
R visitYield(YieldTree node, P p); |
|
10 | 577 |
} |