com.sun.source.tree
Interface Tree

All Known Subinterfaces:
AnnotationTree, ArrayAccessTree, ArrayTypeTree, AssertTree, AssignmentTree, BinaryTree, BlockTree, BracketExprTree, BracketStatTree, BreakTree, CaseTree, CatchTree, ClassTree, CompilationUnitTree, CompoundAssignmentTree, ConditionalExpressionTree, ContinueTree, DoWhileLoopTree, EmptyStatementTree, EnhancedForLoopTree, ErroneousTree, EscapeExprTree, EscapeStatTree, ExpressionStatementTree, ExpressionTree, ForLoopTree, IdentifierTree, IfTree, ImportTree, InstanceOfTree, LabeledStatementTree, LiteralTree, MemberSelectTree, MethodInvocationTree, MethodTree, ModifiersTree, NewArrayTree, NewClassTree, ParameterizedTypeTree, ParenthesizedTree, PrimitiveTypeTree, ReturnTree, StatementTree, SwitchTree, SynchronizedTree, ThrowTree, TryTree, TypeCastTree, TypeParameterTree, UnaryTree, VariableTree, WhileLoopTree, WildcardTree
All Known Implementing Classes:
JCTree.JCAnnotation, JCTree.JCArrayAccess, JCTree.JCArrayTypeTree, JCTree.JCAssert, JCTree.JCAssign, JCTree.JCAssignOp, JCTree.JCBinary, JCTree.JCBlock, JCTree.JCBracketExpr, JCTree.JCBracketStat, JCTree.JCBreak, JCTree.JCCase, JCTree.JCCatch, JCTree.JCClassDecl, JCTree.JCCompilationUnit, JCTree.JCConditional, JCTree.JCContinue, JCTree.JCDoWhileLoop, JCTree.JCEnhancedForLoop, JCTree.JCErroneous, JCTree.JCEscapeExpr, JCTree.JCEscapeStat, JCTree.JCExpression, JCTree.JCExpressionStatement, JCTree.JCFieldAccess, JCTree.JCForLoop, JCTree.JCIdent, JCTree.JCIf, JCTree.JCImport, JCTree.JCInstanceOf, JCTree.JCLabeledStatement, JCTree.JCLiteral, JCTree.JCMethodDecl, JCTree.JCMethodInvocation, JCTree.JCModifiers, JCTree.JCNewArray, JCTree.JCNewClass, JCTree.JCParens, JCTree.JCPrimitiveTypeTree, JCTree.JCReturn, JCTree.JCSkip, JCTree.JCStatement, JCTree.JCSwitch, JCTree.JCSynchronized, JCTree.JCThrow, JCTree.JCTry, JCTree.JCTypeApply, JCTree.JCTypeCast, JCTree.JCTypeParameter, JCTree.JCUnary, JCTree.JCVariableDecl, JCTree.JCWhileLoop, JCTree.JCWildcard, JCTree.LetExpr

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 Sun's Java compiler (javac) and should not be implemented either directly or indirectly by other applications.

Since:
1.6

Nested Class Summary
static class Tree.Kind
          Enumerates all kinds of trees.
 
Method Summary
<R,D> R
accept(TreeVisitor<R,D> visitor, D data)
          Accept method used to implement the visitor pattern.
 Tree.Kind getKind()
          Gets the kind of this tree.
 

Method Detail

getKind

Tree.Kind getKind()
Gets the kind of this tree.

Returns:
the kind of this tree.

accept

<R,D> R accept(TreeVisitor<R,D> visitor,
               D data)
Accept 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 additonal data.