src/share/classes/com/sun/source/tree/TreeVisitor.java

Print this page




  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&trade; 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&eacute;
  55  * @author Jonathan Gibbons
  56  *
  57  * @since 1.6
  58  */
  59 @jdk.Supported
  60 public interface TreeVisitor<R,P> {
  61     R visitAnnotatedType(AnnotatedTypeTree node, P p);
  62     R visitAnnotation(AnnotationTree node, P p);
  63     R visitMethodInvocation(MethodInvocationTree node, P p);
  64     R visitAssert(AssertTree node, P p);
  65     R visitAssignment(AssignmentTree node, P p);
  66     R visitCompoundAssignment(CompoundAssignmentTree node, P p);
  67     R visitBinary(BinaryTree node, P p);
  68     R visitBlock(BlockTree node, P p);
  69     R visitBreak(BreakTree node, P p);
  70     R visitCase(CaseTree node, P p);
  71     R visitCatch(CatchTree node, P p);
  72     R visitClass(ClassTree node, P p);
  73     R visitConditionalExpression(ConditionalExpressionTree node, P p);
  74     R visitContinue(ContinueTree node, P p);
  75     R visitDoWhileLoop(DoWhileLoopTree node, P p);
  76     R visitErroneous(ErroneousTree node, P p);
  77     R visitExpressionStatement(ExpressionStatementTree node, P p);
  78     R visitEnhancedForLoop(EnhancedForLoopTree node, P p);
  79     R visitForLoop(ForLoopTree node, P p);




  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&trade; 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&eacute;
  55  * @author Jonathan Gibbons
  56  *
  57  * @since 1.6
  58  */
  59 @jdk.Exported
  60 public interface TreeVisitor<R,P> {
  61     R visitAnnotatedType(AnnotatedTypeTree node, P p);
  62     R visitAnnotation(AnnotationTree node, P p);
  63     R visitMethodInvocation(MethodInvocationTree node, P p);
  64     R visitAssert(AssertTree node, P p);
  65     R visitAssignment(AssignmentTree node, P p);
  66     R visitCompoundAssignment(CompoundAssignmentTree node, P p);
  67     R visitBinary(BinaryTree node, P p);
  68     R visitBlock(BlockTree node, P p);
  69     R visitBreak(BreakTree node, P p);
  70     R visitCase(CaseTree node, P p);
  71     R visitCatch(CatchTree node, P p);
  72     R visitClass(ClassTree node, P p);
  73     R visitConditionalExpression(ConditionalExpressionTree node, P p);
  74     R visitContinue(ContinueTree node, P p);
  75     R visitDoWhileLoop(DoWhileLoopTree node, P p);
  76     R visitErroneous(ErroneousTree node, P p);
  77     R visitExpressionStatement(ExpressionStatementTree node, P p);
  78     R visitEnhancedForLoop(EnhancedForLoopTree node, P p);
  79     R visitForLoop(ForLoopTree node, P p);