java.lang.Objectcom.sun.tools.javac.tree.JCTree
All Implemented Interfaces:
DiagnosticPosition, Cloneable, Tree
Each subclass is highly standardized. It generally contains only tree fields for the syntactic subcomponents of the node. Some classes that represent identifier uses or definitions also define a Symbol field that denotes the represented identifier. Classes for non-local jumps also carry the jump target as a field. The root class Tree itself defines fields for the tree's type and position. No other fields are kept in a tree node; instead parameters are passed to methods accessing the node.
Except for the methods defined by com.sun.source, the only method defined in subclasses is `visit' which applies a given visitor to the tree. The actual tree processing is done by visitor classes in other packages. The abstract class Visitor, as well as an Factory interface for trees, are defined as inner classes in Tree.
To avoid ambiguities with the Tree API in com.sun.source all sub classes should, by convention, start with JC (javac).
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Nested Class Summary: | ||
|---|---|---|
| public static class | JCTree.JCCompilationUnit | Everything in one source file is kept in a TopLevel structure. |
| public static class | JCTree.JCImport | An import clause. |
| abstract public static class | JCTree.JCStatement | |
| abstract public static class | JCTree.JCExpression | |
| public static class | JCTree.JCClassDecl | A class definition. |
| public static class | JCTree.JCMethodDecl | A method definition. |
| public static class | JCTree.JCVariableDecl | A variable definition. |
| public static class | JCTree.JCSkip | A no-op statement ";". |
| public static class | JCTree.JCBlock | A statement block. |
| public static class | JCTree.JCDoWhileLoop | A do loop |
| public static class | JCTree.JCWhileLoop | A while loop |
| public static class | JCTree.JCForLoop | A for loop. |
| public static class | JCTree.JCEnhancedForLoop | The enhanced for loop. |
| public static class | JCTree.JCLabeledStatement | A labelled expression or statement. |
| public static class | JCTree.JCSwitch | A "switch ( ) { }" construction. |
| public static class | JCTree.JCCase | A "case :" of a switch. |
| public static class | JCTree.JCSynchronized | A synchronized block. |
| public static class | JCTree.JCTry | A "try { } catch ( ) { } finally { }" block. |
| public static class | JCTree.JCCatch | A catch block. |
| public static class | JCTree.JCConditional | A ( ) ? ( ) : ( ) conditional expression |
| public static class | JCTree.JCIf | An "if ( ) { } else { }" block |
| public static class | JCTree.JCExpressionStatement | an expression statement |
| public static class | JCTree.JCBreak | A break from a loop or switch. |
| public static class | JCTree.JCContinue | A continue of a loop. |
| public static class | JCTree.JCReturn | A return statement. |
| public static class | JCTree.JCThrow | A throw statement. |
| public static class | JCTree.JCAssert | An assert statement. |
| public static class | JCTree.JCMethodInvocation | A method invocation |
| public static class | JCTree.JCNewClass | A new(...) operation. |
| public static class | JCTree.JCNewArray | A new[...] operation. |
| public static class | JCTree.JCParens | A parenthesized subexpression ( ... ) |
| public static class | JCTree.JCAssign | A assignment with "=". |
| public static class | JCTree.JCAssignOp | An assignment with "+=", "|=" ... |
| public static class | JCTree.JCUnary | A unary operation. |
| public static class | JCTree.JCBinary | A binary operation. |
| public static class | JCTree.JCTypeCast | A type cast. |
| public static class | JCTree.JCInstanceOf | A type test. |
| public static class | JCTree.JCArrayAccess | An array selection |
| public static class | JCTree.JCFieldAccess | Selects through packages and classes |
| public static class | JCTree.JCIdent | An identifier |
| public static class | JCTree.JCLiteral | A constant value given literally. |
| public static class | JCTree.JCPrimitiveTypeTree | Identifies a basic type. |
| public static class | JCTree.JCArrayTypeTree | An array type, A[] |
| public static class | JCTree.JCTypeApply | A parameterized type, T<...> |
| public static class | JCTree.JCTypeUnion | A union type, T1 | T2 | ... Tn (used in multicatch statements) |
| public static class | JCTree.JCTypeParameter | A formal class parameter. |
| public static class | JCTree.JCWildcard | |
| public static class | JCTree.TypeBoundKind | |
| public static class | JCTree.JCAnnotation | |
| public static class | JCTree.JCModifiers | |
| public static class | JCTree.JCErroneous | |
| public static class | JCTree.LetExpr | (let int x = 3; in x+2) |
| public interface | JCTree.Factory | An interface for tree factories |
| abstract public static class | JCTree.Visitor | A generic visitor class for trees. |
| Field Summary | ||
|---|---|---|
| public static final int | TOPLEVEL | Toplevel nodes, of type TopLevel, representing entire source files. |
| public static final int | IMPORT | Import clauses, of type Import. |
| public static final int | CLASSDEF | Class definitions, of type ClassDef. |
| public static final int | METHODDEF | Method definitions, of type MethodDef. |
| public static final int | VARDEF | Variable definitions, of type VarDef. |
| public static final int | SKIP | The no-op statement ";", of type Skip |
| public static final int | BLOCK | Blocks, of type Block. |
| public static final int | DOLOOP | Do-while loops, of type DoLoop. |
| public static final int | WHILELOOP | While-loops, of type WhileLoop. |
| public static final int | FORLOOP | For-loops, of type ForLoop. |
| public static final int | FOREACHLOOP | Foreach-loops, of type ForeachLoop. |
| public static final int | LABELLED | Labelled statements, of type Labelled. |
| public static final int | SWITCH | Switch statements, of type Switch. |
| public static final int | CASE | Case parts in switch statements, of type Case. |
| public static final int | SYNCHRONIZED | Synchronized statements, of type Synchonized. |
| public static final int | TRY | Try statements, of type Try. |
| public static final int | CATCH | Catch clauses in try statements, of type Catch. |
| public static final int | CONDEXPR | Conditional expressions, of type Conditional. |
| public static final int | IF | Conditional statements, of type If. |
| public static final int | EXEC | Expression statements, of type Exec. |
| public static final int | BREAK | Break statements, of type Break. |
| public static final int | CONTINUE | Continue statements, of type Continue. |
| public static final int | RETURN | Return statements, of type Return. |
| public static final int | THROW | Throw statements, of type Throw. |
| public static final int | ASSERT | Assert statements, of type Assert. |
| public static final int | APPLY | Method invocation expressions, of type Apply. |
| public static final int | NEWCLASS | Class instance creation expressions, of type NewClass. |
| public static final int | NEWARRAY | Array creation expressions, of type NewArray. |
| public static final int | PARENS | Parenthesized subexpressions, of type Parens. |
| public static final int | ASSIGN | Assignment expressions, of type Assign. |
| public static final int | TYPECAST | Type cast expressions, of type TypeCast. |
| public static final int | TYPETEST | Type test expressions, of type TypeTest. |
| public static final int | INDEXED | Indexed array expressions, of type Indexed. |
| public static final int | SELECT | Selections, of type Select. |
| public static final int | IDENT | Simple identifiers, of type Ident. |
| public static final int | LITERAL | Literals, of type Literal. |
| public static final int | TYPEIDENT | Basic type identifiers, of type TypeIdent. |
| public static final int | TYPEARRAY | Array types, of type TypeArray. |
| public static final int | TYPEAPPLY | Parameterized types, of type TypeApply. |
| public static final int | TYPEUNION | Union types, of type TypeUnion |
| public static final int | TYPEPARAMETER | Formal type parameters, of type TypeParameter. |
| public static final int | WILDCARD | Type argument. |
| public static final int | TYPEBOUNDKIND | Bound kind: extends, super, exact, or unbound |
| public static final int | ANNOTATION | metadata: Annotation. |
| public static final int | MODIFIERS | metadata: Modifiers |
| public static final int | ANNOTATED_TYPE | |
| public static final int | ERRONEOUS | Error trees, of type Erroneous. |
| public static final int | POS | Unary operators, of type Unary. |
| public static final int | NEG | |
| public static final int | NOT | |
| public static final int | COMPL | |
| public static final int | PREINC | |
| public static final int | PREDEC | |
| public static final int | POSTINC | |
| public static final int | POSTDEC | |
| public static final int | NULLCHK | unary operator for null reference checks, only used internally. |
| public static final int | OR | Binary operators, of type Binary. |
| public static final int | AND | |
| public static final int | BITOR | |
| public static final int | BITXOR | |
| public static final int | BITAND | |
| public static final int | EQ | |
| public static final int | NE | |
| public static final int | LT | |
| public static final int | GT | |
| public static final int | LE | |
| public static final int | GE | |
| public static final int | SL | |
| public static final int | SR | |
| public static final int | USR | |
| public static final int | PLUS | |
| public static final int | MINUS | |
| public static final int | MUL | |
| public static final int | DIV | |
| public static final int | MOD | |
| public static final int | BITOR_ASG | Assignment operators, of type Assignop. |
| public static final int | BITXOR_ASG | |
| public static final int | BITAND_ASG | |
| public static final int | SL_ASG | |
| public static final int | SR_ASG | |
| public static final int | USR_ASG | |
| public static final int | PLUS_ASG | |
| public static final int | MINUS_ASG | |
| public static final int | MUL_ASG | |
| public static final int | DIV_ASG | |
| public static final int | MOD_ASG | |
| public static final int | LETEXPR | A synthetic let expression, of type LetExpr. |
| public static final int | ASGOffset | The offset between assignment operators and normal operators. |
| public int | pos | |
| public Type | type | |
| Method from com.sun.tools.javac.tree.JCTree Summary: |
|---|
| accept, accept, clone, getEndPosition, getPreferredPosition, getStartPosition, getTag, getTree, pos, setPos, setType, toString |
| Methods from java.lang.Object: |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from com.sun.tools.javac.tree.JCTree Detail: |
|---|
|
|
|
|
|
|
|
|
|
|
|
|