R
- このビジターのメソッドの戻り型。結果を返すことを必要としないビジターの Void
を使用する。P
- このビジターのメソッドに追加するパラメータの型。追加のパラメータを必要としないビジターの Void
を使用する。public interface TreeVisitor<R,P>
accept
メソッドに渡されると、そのツリーにもっとも適した visitXYZ メソッドが呼び出されます。
このインタフェースを実装するクラスは、追加パラメータ p
が null
のときに NullPointerException
をスローする場合としない場合があります。詳細については、クラスの実装に関するドキュメントを参照してください。
警告: Java™ プログラミング言語の将来のバージョンに現在は未知の新しい言語構造が追加される場合、それらを格納するために、このインタフェースにメソッドが追加される可能性があります。したがって、このインタフェースを直接実装するビジタークラスは、プラットフォームの将来のバージョンでソースの互換性がなくなる可能性があります。
R visitAnnotation(AnnotationTree node, P p)
R visitMethodInvocation(MethodInvocationTree node, P p)
R visitAssert(AssertTree node, P p)
R visitAssignment(AssignmentTree node, P p)
R visitCompoundAssignment(CompoundAssignmentTree node, P p)
R visitBinary(BinaryTree node, P p)
R visitConditionalExpression(ConditionalExpressionTree node, P p)
R visitContinue(ContinueTree node, P p)
R visitDoWhileLoop(DoWhileLoopTree node, P p)
R visitErroneous(ErroneousTree node, P p)
R visitExpressionStatement(ExpressionStatementTree node, P p)
R visitEnhancedForLoop(EnhancedForLoopTree node, P p)
R visitForLoop(ForLoopTree node, P p)
R visitIdentifier(IdentifierTree node, P p)
R visitImport(ImportTree node, P p)
R visitArrayAccess(ArrayAccessTree node, P p)
R visitLabeledStatement(LabeledStatementTree node, P p)
R visitLiteral(LiteralTree node, P p)
R visitMethod(MethodTree node, P p)
R visitModifiers(ModifiersTree node, P p)
R visitNewArray(NewArrayTree node, P p)
R visitNewClass(NewClassTree node, P p)
R visitParenthesized(ParenthesizedTree node, P p)
R visitReturn(ReturnTree node, P p)
R visitMemberSelect(MemberSelectTree node, P p)
R visitEmptyStatement(EmptyStatementTree node, P p)
R visitSwitch(SwitchTree node, P p)
R visitSynchronized(SynchronizedTree node, P p)
R visitCompilationUnit(CompilationUnitTree node, P p)
R visitParameterizedType(ParameterizedTypeTree node, P p)
R visitUnionType(UnionTypeTree node, P p)
R visitArrayType(ArrayTypeTree node, P p)
R visitTypeCast(TypeCastTree node, P p)
R visitPrimitiveType(PrimitiveTypeTree node, P p)
R visitTypeParameter(TypeParameterTree node, P p)
R visitInstanceOf(InstanceOfTree node, P p)
R visitVariable(VariableTree node, P p)
R visitWhileLoop(WhileLoopTree node, P p)
R visitWildcard(WildcardTree node, P p)
Copyright © 2005, 2013, Oracle and/or its affiliates. All rights reserved.