| java.lang.Object com.sun.tools.javac.tree.JCTree
All known Subclasses: com.sun.tools.javac.comp.MemberEnter, com.sun.tools.javac.comp.Attr, com.sun.tools.javac.tree.TreeTranslator, com.sun.tools.javac.jvm.Gen, com.sun.tools.javac.tree.TreeMaker, com.sun.tools.javac.tree.Pretty, com.sun.tools.javac.comp.Enter,
JCTree | abstract public class JCTree implements Tree,Cloneable,DiagnosticPosition(Code) | | Root class for abstract syntax tree nodes. It provides definitions
for specific tree nodes as subclasses nested inside.
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 API supported by Sun Microsystems.
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.
See Also: TreeMaker See Also: TreeInfo See Also: TreeTranslator See Also: Pretty |
Inner Class :public static class JCClassDecl extends JCStatement implements ClassTree | |
Inner Class :public static class JCMethodDecl extends JCTree implements MethodTree | |
Inner Class :public static class JCVariableDecl extends JCStatement implements VariableTree | |
Inner Class :public static class JCBlock extends JCStatement implements BlockTree | |
Inner Class :public static class JCDoWhileLoop extends JCStatement implements DoWhileLoopTree | |
Inner Class :public static class JCWhileLoop extends JCStatement implements WhileLoopTree | |
Inner Class :public static class JCForLoop extends JCStatement implements ForLoopTree | |
Inner Class :public static class JCEnhancedForLoop extends JCStatement implements EnhancedForLoopTree | |
Inner Class :public static class JCLabeledStatement extends JCStatement implements LabeledStatementTree | |
Inner Class :public static class JCSwitch extends JCStatement implements SwitchTree | |
Inner Class :public static class JCCase extends JCStatement implements CaseTree | |
Inner Class :public static class JCSynchronized extends JCStatement implements SynchronizedTree | |
Inner Class :public static class JCTry extends JCStatement implements TryTree | |
Inner Class :public static class JCCatch extends JCTree implements CatchTree | |
Inner Class :public static class JCIf extends JCStatement implements IfTree | |
Inner Class :public static class JCBreak extends JCStatement implements BreakTree | |
Inner Class :public static class JCContinue extends JCStatement implements ContinueTree | |
Inner Class :public static class JCReturn extends JCStatement implements ReturnTree | |
Inner Class :public static class JCThrow extends JCStatement implements ThrowTree | |
Inner Class :public static class JCAssert extends JCStatement implements AssertTree | |
Inner Class :public static class JCMethodInvocation extends JCExpression implements MethodInvocationTree | |
Inner Class :public static class JCNewClass extends JCExpression implements NewClassTree | |
Inner Class :public static class JCNewArray extends JCExpression implements NewArrayTree | |
Inner Class :public static class JCParens extends JCExpression implements ParenthesizedTree | |
Inner Class :public static class JCAssign extends JCExpression implements AssignmentTree | |
Inner Class :public static class JCUnary extends JCExpression implements UnaryTree | |
Inner Class :public static class JCBinary extends JCExpression implements BinaryTree | |
Inner Class :public static class JCTypeCast extends JCExpression implements TypeCastTree | |
Inner Class :public static class JCInstanceOf extends JCExpression implements InstanceOfTree | |
Inner Class :public static class JCArrayAccess extends JCExpression implements ArrayAccessTree | |
Inner Class :public static class JCFieldAccess extends JCExpression implements MemberSelectTree | |
Inner Class :public static class JCIdent extends JCExpression implements IdentifierTree | |
Inner Class :public static class JCLiteral extends JCExpression implements LiteralTree | |
Inner Class :public static class JCPrimitiveTypeTree extends JCExpression implements PrimitiveTypeTree | |
Inner Class :public static class JCArrayTypeTree extends JCExpression implements ArrayTypeTree | |
Inner Class :public static class JCWildcard extends JCExpression implements WildcardTree | |
Inner Class :public static class TypeBoundKind extends JCTree | |
Inner Class :public static class JCAnnotation extends JCExpression implements AnnotationTree | |
Inner Class :public static class LetExpr extends JCExpression | |
Inner Class :public interface Factory | |
Inner Class :abstract public static class Visitor | |
Field Summary | |
final public static int | AND | final public static int | ANNOTATION metadata: Annotation. | final public static int | APPLY Method invocation expressions, of type Apply. | final public static int | ASGOffset The offset between assignment operators and normal operators. | final public static int | ASSERT Assert statements, of type Assert. | final public static int | ASSIGN Assignment expressions, of type Assign. | final public static int | BITAND | final public static int | BITAND_ASG | final public static int | BITOR | final public static int | BITOR_ASG Assignment operators, of type Assignop. | final public static int | BITXOR | final public static int | BITXOR_ASG | final public static int | BLOCK Blocks, of type Block. | final public static int | BREAK Break statements, of type Break. | final public static int | CASE Case parts in switch statements, of type Case. | final public static int | CATCH Catch clauses in try statements, of type Catch. | final public static int | CLASSDEF Class definitions, of type ClassDef. | final public static int | COMPL | final public static int | CONDEXPR Conditional expressions, of type Conditional. | final public static int | CONTINUE Continue statements, of type Continue. | final public static int | DIV | final public static int | DIV_ASG | final public static int | DOLOOP Do-while loops, of type DoLoop. | final public static int | EQ | final public static int | ERRONEOUS Error trees, of type Erroneous. | final public static int | EXEC Expression statements, of type Exec. | final public static int | FOREACHLOOP Foreach-loops, of type ForeachLoop. | final public static int | FORLOOP For-loops, of type ForLoop. | final public static int | GE | final public static int | GT | final public static int | IDENT Simple identifiers, of type Ident. | final public static int | IF Conditional statements, of type If. | final public static int | IMPORT Import clauses, of type Import. | final public static int | INDEXED Indexed array expressions, of type Indexed. | final public static int | LABELLED Labelled statements, of type Labelled. | final public static int | LE | final public static int | LETEXPR A synthetic let expression, of type LetExpr. | final public static int | LITERAL Literals, of type Literal. | final public static int | LT | final public static int | METHODDEF Method definitions, of type MethodDef. | final public static int | MINUS | final public static int | MINUS_ASG | final public static int | MOD | final public static int | MODIFIERS | final public static int | MOD_ASG | final public static int | MUL | final public static int | MUL_ASG | final public static int | NE | final public static int | NEG | final public static int | NEWARRAY Array creation expressions, of type NewArray. | final public static int | NEWCLASS Class instance creation expressions, of type NewClass. | final public static int | NOT | final public static int | NULLCHK unary operator for null reference checks, only used internally. | final public static int | OR Binary operators, of type Binary. | final public static int | PARENS Parenthesized subexpressions, of type Parens. | final public static int | PLUS | final public static int | PLUS_ASG | final public static int | POS Unary operators, of type Unary. | final public static int | POSTDEC | final public static int | POSTINC | final public static int | PREDEC | final public static int | PREINC | final public static int | RETURN Return statements, of type Return. | final public static int | SELECT Selections, of type Select. | final public static int | SKIP | final public static int | SL | final public static int | SL_ASG | final public static int | SR | final public static int | SR_ASG | final public static int | SWITCH Switch statements, of type Switch. | final public static int | SYNCHRONIZED Synchronized statements, of type Synchonized. | final public static int | THROW Throw statements, of type Throw. | final public static int | TOPLEVEL Toplevel nodes, of type TopLevel, representing entire source files. | final public static int | TRY Try statements, of type Try. | final public static int | TYPEAPPLY Parameterized types, of type TypeApply. | final public static int | TYPEARRAY Array types, of type TypeArray. | final public static int | TYPEBOUNDKIND | final public static int | TYPECAST Type cast expressions, of type TypeCast. | final public static int | TYPEIDENT Basic type identifiers, of type TypeIdent. | final public static int | TYPEPARAMETER Formal type parameters, of type TypeParameter. | final public static int | TYPETEST Type test expressions, of type TypeTest. | final public static int | USR | final public static int | USR_ASG | final public static int | VARDEF Variable definitions, of type VarDef. | final public static int | WHILELOOP While-loops, of type WhileLoop. | final public static int | WILDCARD Type argument. | public int | pos | public Type | type |
AND | final public static int AND(Code) | | |
ANNOTATION | final public static int ANNOTATION(Code) | | metadata: Annotation.
|
APPLY | final public static int APPLY(Code) | | Method invocation expressions, of type Apply.
|
ASGOffset | final public static int ASGOffset(Code) | | The offset between assignment operators and normal operators.
|
ASSERT | final public static int ASSERT(Code) | | Assert statements, of type Assert.
|
ASSIGN | final public static int ASSIGN(Code) | | Assignment expressions, of type Assign.
|
BITAND | final public static int BITAND(Code) | | |
BITAND_ASG | final public static int BITAND_ASG(Code) | | |
BITOR | final public static int BITOR(Code) | | |
BITOR_ASG | final public static int BITOR_ASG(Code) | | Assignment operators, of type Assignop.
|
BITXOR | final public static int BITXOR(Code) | | |
BITXOR_ASG | final public static int BITXOR_ASG(Code) | | |
BLOCK | final public static int BLOCK(Code) | | Blocks, of type Block.
|
BREAK | final public static int BREAK(Code) | | Break statements, of type Break.
|
CASE | final public static int CASE(Code) | | Case parts in switch statements, of type Case.
|
CATCH | final public static int CATCH(Code) | | Catch clauses in try statements, of type Catch.
|
CLASSDEF | final public static int CLASSDEF(Code) | | Class definitions, of type ClassDef.
|
COMPL | final public static int COMPL(Code) | | |
CONDEXPR | final public static int CONDEXPR(Code) | | Conditional expressions, of type Conditional.
|
CONTINUE | final public static int CONTINUE(Code) | | Continue statements, of type Continue.
|
DIV | final public static int DIV(Code) | | |
DIV_ASG | final public static int DIV_ASG(Code) | | |
DOLOOP | final public static int DOLOOP(Code) | | Do-while loops, of type DoLoop.
|
EQ | final public static int EQ(Code) | | |
ERRONEOUS | final public static int ERRONEOUS(Code) | | Error trees, of type Erroneous.
|
EXEC | final public static int EXEC(Code) | | Expression statements, of type Exec.
|
FOREACHLOOP | final public static int FOREACHLOOP(Code) | | Foreach-loops, of type ForeachLoop.
|
FORLOOP | final public static int FORLOOP(Code) | | For-loops, of type ForLoop.
|
GE | final public static int GE(Code) | | |
GT | final public static int GT(Code) | | |
IDENT | final public static int IDENT(Code) | | Simple identifiers, of type Ident.
|
IF | final public static int IF(Code) | | Conditional statements, of type If.
|
IMPORT | final public static int IMPORT(Code) | | Import clauses, of type Import.
|
INDEXED | final public static int INDEXED(Code) | | Indexed array expressions, of type Indexed.
|
LABELLED | final public static int LABELLED(Code) | | Labelled statements, of type Labelled.
|
LE | final public static int LE(Code) | | |
LETEXPR | final public static int LETEXPR(Code) | | A synthetic let expression, of type LetExpr.
|
LITERAL | final public static int LITERAL(Code) | | Literals, of type Literal.
|
LT | final public static int LT(Code) | | |
METHODDEF | final public static int METHODDEF(Code) | | Method definitions, of type MethodDef.
|
MINUS | final public static int MINUS(Code) | | |
MINUS_ASG | final public static int MINUS_ASG(Code) | | |
MOD | final public static int MOD(Code) | | |
MODIFIERS | final public static int MODIFIERS(Code) | | metadata: Modifiers
|
MOD_ASG | final public static int MOD_ASG(Code) | | |
MUL | final public static int MUL(Code) | | |
MUL_ASG | final public static int MUL_ASG(Code) | | |
NE | final public static int NE(Code) | | |
NEG | final public static int NEG(Code) | | |
NEWARRAY | final public static int NEWARRAY(Code) | | Array creation expressions, of type NewArray.
|
NEWCLASS | final public static int NEWCLASS(Code) | | Class instance creation expressions, of type NewClass.
|
NOT | final public static int NOT(Code) | | |
NULLCHK | final public static int NULLCHK(Code) | | unary operator for null reference checks, only used internally.
|
OR | final public static int OR(Code) | | Binary operators, of type Binary.
|
PARENS | final public static int PARENS(Code) | | Parenthesized subexpressions, of type Parens.
|
PLUS | final public static int PLUS(Code) | | |
PLUS_ASG | final public static int PLUS_ASG(Code) | | |
POS | final public static int POS(Code) | | Unary operators, of type Unary.
|
POSTDEC | final public static int POSTDEC(Code) | | |
POSTINC | final public static int POSTINC(Code) | | |
PREDEC | final public static int PREDEC(Code) | | |
PREINC | final public static int PREINC(Code) | | |
RETURN | final public static int RETURN(Code) | | Return statements, of type Return.
|
SELECT | final public static int SELECT(Code) | | Selections, of type Select.
|
SKIP | final public static int SKIP(Code) | | The no-op statement ";", of type Skip
|
SL | final public static int SL(Code) | | |
SL_ASG | final public static int SL_ASG(Code) | | |
SR | final public static int SR(Code) | | |
SR_ASG | final public static int SR_ASG(Code) | | |
SWITCH | final public static int SWITCH(Code) | | Switch statements, of type Switch.
|
SYNCHRONIZED | final public static int SYNCHRONIZED(Code) | | Synchronized statements, of type Synchonized.
|
THROW | final public static int THROW(Code) | | Throw statements, of type Throw.
|
TOPLEVEL | final public static int TOPLEVEL(Code) | | Toplevel nodes, of type TopLevel, representing entire source files.
|
TRY | final public static int TRY(Code) | | Try statements, of type Try.
|
TYPEAPPLY | final public static int TYPEAPPLY(Code) | | Parameterized types, of type TypeApply.
|
TYPEARRAY | final public static int TYPEARRAY(Code) | | Array types, of type TypeArray.
|
TYPEBOUNDKIND | final public static int TYPEBOUNDKIND(Code) | | Bound kind: extends, super, exact, or unbound
|
TYPECAST | final public static int TYPECAST(Code) | | Type cast expressions, of type TypeCast.
|
TYPEIDENT | final public static int TYPEIDENT(Code) | | Basic type identifiers, of type TypeIdent.
|
TYPEPARAMETER | final public static int TYPEPARAMETER(Code) | | Formal type parameters, of type TypeParameter.
|
TYPETEST | final public static int TYPETEST(Code) | | Type test expressions, of type TypeTest.
|
USR | final public static int USR(Code) | | |
USR_ASG | final public static int USR_ASG(Code) | | |
VARDEF | final public static int VARDEF(Code) | | Variable definitions, of type VarDef.
|
WHILELOOP | final public static int WHILELOOP(Code) | | While-loops, of type WhileLoop.
|
WILDCARD | final public static int WILDCARD(Code) | | Type argument.
|
accept | abstract public void accept(Visitor v)(Code) | | Visit this tree with a given visitor.
|
clone | public Object clone()(Code) | | Return a shallow copy of this tree.
|
getPreferredPosition | public int getPreferredPosition()(Code) | | |
getStartPosition | public int getStartPosition()(Code) | | |
getTag | abstract public int getTag()(Code) | | |
pos | public DiagnosticPosition pos()(Code) | | Get a default position for this tree node.
|
setPos | public JCTree setPos(int pos)(Code) | | Set position field and return this tree.
|
setType | public JCTree setType(Type type)(Code) | | Set type field and return this tree.
|
toString | public String toString()(Code) | | Convert a tree to a pretty-printed string.
|
|
|