|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.tree.TreeMaker
public class TreeMaker
Factory class for trees.
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.
| Nested Class Summary | |
|---|---|
(package private) class |
TreeMaker.AnnotationBuilder
|
| Field Summary | |
|---|---|
(package private) TreeMaker.AnnotationBuilder |
annotationBuilder
|
(package private) Names |
names
The current name table. |
int |
pos
The position at which subsequent trees will be created. |
(package private) Symtab |
syms
The current symbol table. |
JCTree.JCCompilationUnit |
toplevel
The toplevel tree to which created trees belong. |
protected static Context.Key<TreeMaker> |
treeMakerKey
The context key for the tree factory. |
(package private) Types |
types
|
| Constructor Summary | |
|---|---|
protected |
TreeMaker(Context context)
Create a tree maker with null toplevel and NOPOS as initial position. |
(package private) |
TreeMaker(JCTree.JCCompilationUnit toplevel,
Names names,
Types types,
Symtab syms)
Create a tree maker with a given toplevel and FIRSTPOS as initial position. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Context.Key<TreeMaker> treeMakerKey
public int pos
public JCTree.JCCompilationUnit toplevel
Names names
Types types
Symtab syms
TreeMaker.AnnotationBuilder annotationBuilder
| Constructor Detail |
|---|
protected TreeMaker(Context context)
TreeMaker(JCTree.JCCompilationUnit toplevel,
Names names,
Types types,
Symtab syms)
| Method Detail |
|---|
public static TreeMaker instance(Context context)
public TreeMaker forToplevel(JCTree.JCCompilationUnit toplevel)
public TreeMaker at(int pos)
public TreeMaker at(JCDiagnostic.DiagnosticPosition pos)
public JCTree.JCCompilationUnit TopLevel(List<JCTree.JCAnnotation> packageAnnotations,
JCTree.JCExpression pid,
List<JCTree> defs)
TopLevel in interface JCTree.Factorydefs - a list of ClassDef, Import, and Skip
public JCTree.JCImport Import(JCTree qualid,
boolean importStatic)
Import in interface JCTree.Factory
public JCTree.JCClassDecl ClassDef(JCTree.JCModifiers mods,
Name name,
List<JCTree.JCTypeParameter> typarams,
JCTree extending,
List<JCTree.JCExpression> implementing,
List<JCTree> defs)
ClassDef in interface JCTree.Factory
public JCTree.JCMethodDecl MethodDef(JCTree.JCModifiers mods,
Name name,
JCTree.JCExpression restype,
List<JCTree.JCTypeParameter> typarams,
List<JCTree.JCVariableDecl> params,
List<JCTree.JCExpression> thrown,
JCTree.JCBlock body,
JCTree.JCExpression defaultValue)
MethodDef in interface JCTree.Factory
public JCTree.JCVariableDecl VarDef(JCTree.JCModifiers mods,
Name name,
JCTree.JCExpression vartype,
JCTree.JCExpression init)
VarDef in interface JCTree.Factorypublic JCTree.JCSkip Skip()
Skip in interface JCTree.Factory
public JCTree.JCBlock Block(long flags,
List<JCTree.JCStatement> stats)
Block in interface JCTree.Factorypublic JCTree.JCExpression BracketExpr(JCTree.JCExpression body)
BracketExpr in interface JCTree.Factorypublic JCTree.JCExpression BracketStat(List<JCTree.JCStatement> body)
BracketStat in interface JCTree.Factorypublic JCTree.JCExpression EscapeExpr(JCTree.JCExpression body)
EscapeExpr in interface JCTree.Factorypublic JCTree.JCStatement EscapeStat(JCTree.JCExpression body)
EscapeStat in interface JCTree.Factory
public JCTree.JCDoWhileLoop DoLoop(JCTree.JCStatement body,
JCTree.JCExpression cond)
DoLoop in interface JCTree.Factory
public JCTree.JCWhileLoop WhileLoop(JCTree.JCExpression cond,
JCTree.JCStatement body)
WhileLoop in interface JCTree.Factory
public JCTree.JCForLoop ForLoop(List<JCTree.JCStatement> init,
JCTree.JCExpression cond,
List<JCTree.JCExpressionStatement> step,
JCTree.JCStatement body)
ForLoop in interface JCTree.Factory
public JCTree.JCEnhancedForLoop ForeachLoop(JCTree.JCVariableDecl var,
JCTree.JCExpression expr,
JCTree.JCStatement body)
ForeachLoop in interface JCTree.Factory
public JCTree.JCLabeledStatement Labelled(Name label,
JCTree.JCStatement body)
Labelled in interface JCTree.Factory
public JCTree.JCSwitch Switch(JCTree.JCExpression selector,
List<JCTree.JCCase> cases)
Switch in interface JCTree.Factory
public JCTree.JCCase Case(JCTree.JCExpression pat,
List<JCTree.JCStatement> stats)
Case in interface JCTree.Factory
public JCTree.JCSynchronized Synchronized(JCTree.JCExpression lock,
JCTree.JCBlock body)
Synchronized in interface JCTree.Factory
public JCTree.JCTry Try(JCTree.JCBlock body,
List<JCTree.JCCatch> catchers,
JCTree.JCBlock finalizer)
Try in interface JCTree.Factory
public JCTree.JCCatch Catch(JCTree.JCVariableDecl param,
JCTree.JCBlock body)
Catch in interface JCTree.Factory
public JCTree.JCConditional Conditional(JCTree.JCExpression cond,
JCTree.JCExpression thenpart,
JCTree.JCExpression elsepart)
Conditional in interface JCTree.Factory
public JCTree.JCIf If(JCTree.JCExpression cond,
JCTree.JCStatement thenpart,
JCTree.JCStatement elsepart)
If in interface JCTree.Factorypublic JCTree.JCExpressionStatement Exec(JCTree.JCExpression expr)
Exec in interface JCTree.Factorypublic JCTree.JCBreak Break(Name label)
Break in interface JCTree.Factorypublic JCTree.JCContinue Continue(Name label)
Continue in interface JCTree.Factorypublic JCTree.JCReturn Return(JCTree.JCExpression expr)
Return in interface JCTree.Factorypublic JCTree.JCThrow Throw(JCTree expr)
Throw in interface JCTree.Factory
public JCTree.JCAssert Assert(JCTree.JCExpression cond,
JCTree.JCExpression detail)
Assert in interface JCTree.Factory
public JCTree.JCMethodInvocation Apply(List<JCTree.JCExpression> typeargs,
JCTree.JCExpression fn,
List<JCTree.JCExpression> args)
Apply in interface JCTree.Factory
public JCTree.JCNewClass NewClass(JCTree.JCExpression encl,
List<JCTree.JCExpression> typeargs,
JCTree.JCExpression clazz,
List<JCTree.JCExpression> args,
JCTree.JCClassDecl def)
NewClass in interface JCTree.Factory
public JCTree.JCNewArray NewArray(JCTree.JCExpression elemtype,
List<JCTree.JCExpression> dims,
List<JCTree.JCExpression> elems)
NewArray in interface JCTree.Factorypublic JCTree.JCParens Parens(JCTree.JCExpression expr)
Parens in interface JCTree.Factory
public JCTree.JCAssign Assign(JCTree.JCExpression lhs,
JCTree.JCExpression rhs)
Assign in interface JCTree.Factory
public JCTree.JCAssignOp Assignop(int opcode,
JCTree lhs,
JCTree rhs)
Assignop in interface JCTree.Factory
public JCTree.JCUnary Unary(int opcode,
JCTree.JCExpression arg)
Unary in interface JCTree.Factory
public JCTree.JCBinary Binary(int opcode,
JCTree.JCExpression lhs,
JCTree.JCExpression rhs)
Binary in interface JCTree.Factory
public JCTree.JCTypeCast TypeCast(JCTree clazz,
JCTree.JCExpression expr)
TypeCast in interface JCTree.Factory
public JCTree.JCInstanceOf TypeTest(JCTree.JCExpression expr,
JCTree clazz)
TypeTest in interface JCTree.Factory
public JCTree.JCArrayAccess Indexed(JCTree.JCExpression indexed,
JCTree.JCExpression index)
Indexed in interface JCTree.Factory
public JCTree.JCFieldAccess Select(JCTree.JCExpression selected,
Name selector)
Select in interface JCTree.Factorypublic JCTree.JCIdent Ident(Name name)
Ident in interface JCTree.Factory
public JCTree.JCLiteral Literal(int tag,
java.lang.Object value)
Literal in interface JCTree.Factorypublic JCTree.JCPrimitiveTypeTree TypeIdent(int typetag)
TypeIdent in interface JCTree.Factorypublic JCTree.JCArrayTypeTree TypeArray(JCTree.JCExpression elemtype)
TypeArray in interface JCTree.Factory
public JCTree.JCTypeApply TypeApply(JCTree.JCExpression clazz,
List<JCTree.JCExpression> arguments)
TypeApply in interface JCTree.Factory
public JCTree.JCTypeParameter TypeParameter(Name name,
List<JCTree.JCExpression> bounds)
TypeParameter in interface JCTree.Factory
public JCTree.JCWildcard Wildcard(JCTree.TypeBoundKind kind,
JCTree type)
Wildcard in interface JCTree.Factorypublic JCTree.TypeBoundKind TypeBoundKind(BoundKind kind)
TypeBoundKind in interface JCTree.Factory
public JCTree.JCAnnotation Annotation(JCTree annotationType,
List<JCTree.JCExpression> args)
Annotation in interface JCTree.Factory
public JCTree.JCModifiers Modifiers(long flags,
List<JCTree.JCAnnotation> annotations)
Modifiers in interface JCTree.Factorypublic JCTree.JCModifiers Modifiers(long flags)
public JCTree.JCErroneous Erroneous()
public JCTree.JCErroneous Erroneous(List<? extends JCTree> errs)
Erroneous in interface JCTree.Factory
public JCTree.LetExpr LetExpr(List<JCTree.JCVariableDecl> defs,
JCTree expr)
LetExpr in interface JCTree.Factory
public JCTree.JCClassDecl AnonymousClassDef(JCTree.JCModifiers mods,
List<JCTree> defs)
public JCTree.LetExpr LetExpr(JCTree.JCVariableDecl def,
JCTree expr)
public JCTree.JCIdent Ident(Symbol sym)
public JCTree.JCExpression Select(JCTree.JCExpression base,
Symbol sym)
base - The qualifier tree.public JCTree.JCExpression QualIdent(Symbol sym)
public JCTree.JCExpression Ident(JCTree.JCVariableDecl param)
public List<JCTree.JCExpression> Idents(List<JCTree.JCVariableDecl> params)
public JCTree.JCExpression This(Type t)
public JCTree.JCExpression ClassLiteral(Symbol.ClassSymbol clazz)
public JCTree.JCExpression ClassLiteral(Type t)
public JCTree.JCIdent Super(Type t,
Symbol.TypeSymbol owner)
public JCTree.JCMethodInvocation App(JCTree.JCExpression meth,
List<JCTree.JCExpression> args)
public JCTree.JCMethodInvocation App(JCTree.JCExpression meth)
public JCTree.JCExpression Create(Symbol ctor,
List<JCTree.JCExpression> args)
public JCTree.JCExpression Type(Type t)
private JCTree.JCExpression Selectors(JCTree.JCExpression base,
Symbol sym,
Symbol limit)
public List<JCTree.JCExpression> Types(List<Type> ts)
public JCTree.JCVariableDecl VarDef(Symbol.VarSymbol v,
JCTree.JCExpression init)
public List<JCTree.JCAnnotation> Annotations(List<Attribute.Compound> attributes)
public JCTree.JCLiteral Literal(java.lang.Object value)
public JCTree.JCAnnotation Annotation(Attribute a)
public JCTree.JCMethodDecl MethodDef(Symbol.MethodSymbol m,
JCTree.JCBlock body)
public JCTree.JCMethodDecl MethodDef(Symbol.MethodSymbol m,
Type mtype,
JCTree.JCBlock body)
public JCTree.JCTypeParameter TypeParam(Name name,
Type.TypeVar tvar)
public List<JCTree.JCTypeParameter> TypeParams(List<Type> typarams)
public JCTree.JCVariableDecl Param(Name name,
Type argtype,
Symbol owner)
public List<JCTree.JCVariableDecl> Params(List<Type> argtypes,
Symbol owner)
public JCTree.JCStatement Call(JCTree.JCExpression apply)
public JCTree.JCStatement Assignment(Symbol v,
JCTree.JCExpression rhs)
public JCTree.JCArrayAccess Indexed(Symbol v,
JCTree.JCExpression index)
public JCTree.JCTypeCast TypeCast(Type type,
JCTree.JCExpression expr)
boolean isUnqualifiable(Symbol sym)
public Name paramName(int i)
public Name typaramName(int i)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||