- All Known Subinterfaces:
- AnnotatedTypeTree,- AnnotationTree,- ArrayAccessTree,- ArrayTypeTree,- AssertTree,- AssignmentTree,- BinaryTree,- BlockTree,- BreakTree,- CaseTree,- CatchTree,- ClassTree,- CompilationUnitTree,- CompoundAssignmentTree,- ConditionalExpressionTree,- ContinueTree,- DirectiveTree,- DoWhileLoopTree,- EmptyStatementTree,- EnhancedForLoopTree,- ErroneousTree,- ExportsTree,- ExpressionStatementTree,- ExpressionTree,- ForLoopTree,- IdentifierTree,- IfTree,- ImportTree,- InstanceOfTree,- IntersectionTypeTree,- LabeledStatementTree,- LambdaExpressionTree,- LiteralTree,- MemberReferenceTree,- MemberSelectTree,- MethodInvocationTree,- MethodTree,- ModifiersTree,- ModuleTree,- NewArrayTree,- NewClassTree,- OpensTree,- PackageTree,- ParameterizedTypeTree,- ParenthesizedTree,- PrimitiveTypeTree,- ProvidesTree,- RequiresTree,- ReturnTree,- StatementTree,- SwitchExpressionTree,- SwitchTree,- SynchronizedTree,- ThrowTree,- TryTree,- TypeCastTree,- TypeParameterTree,- UnaryTree,- UnionTypeTree,- UsesTree,- VariableTree,- WhileLoopTree,- WildcardTree,- YieldTree
public interface Tree
Common interface for all nodes in an abstract syntax tree.
 
WARNING: This interface and its sub-interfaces are subject to change as the Java™ programming language evolves. These interfaces are implemented by the JDK Java compiler (javac) and should not be implemented either directly or indirectly by other applications.
- Since:
- 1.6
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classTree.KindEnumerates all kinds of trees.
- 
Method SummaryModifier and Type Method Description <R, D> Raccept(TreeVisitor<R,D> visitor, D data)Accept method used to implement the visitor pattern.Tree.KindgetKind()Returns the kind of this tree.
- 
Method Details- 
getKindTree.Kind getKind()Returns the kind of this tree.- Returns:
- the kind of this tree.
 
- 
acceptAccept method used to implement the visitor pattern. The visitor pattern is used to implement operations on trees.- Type Parameters:
- R- result type of this operation.
- D- type of additional data.
- Parameters:
- visitor- the visitor to be called
- data- a value to be passed to the visitor
- Returns:
- the result returned from calling the visitor
 
 
-