public class TreeMaker extends Object implements JCTree.Factory
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.
| Modifier and Type | Field and Description |
|---|---|
int |
pos
The position at which subsequent trees will be created.
|
JCTree.JCCompilationUnit |
toplevel
The toplevel tree to which created trees belong.
|
protected static Context.Key<TreeMaker> |
treeMakerKey
The context key for the tree factory.
|
| Modifier | Constructor and Description |
|---|---|
protected |
TreeMaker(Context context)
Create a tree maker with null toplevel and NOPOS as initial position.
|
protected |
TreeMaker(JCTree.JCCompilationUnit toplevel,
Names names,
Types types,
Symtab syms)
Create a tree maker with a given toplevel and FIRSTPOS as initial position.
|
protected static final Context.Key<TreeMaker> treeMakerKey
public int pos
public JCTree.JCCompilationUnit toplevel
protected TreeMaker(Context context)
protected TreeMaker(JCTree.JCCompilationUnit toplevel, Names names, Types types, Symtab syms)
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 Skippublic JCTree.JCImport Import(JCTree qualid, boolean importStatic)
Import in interface JCTree.Factorypublic JCTree.JCClassDecl ClassDef(JCTree.JCModifiers mods, Name name, List<JCTree.JCTypeParameter> typarams, JCTree.JCExpression extending, List<JCTree.JCExpression> implementing, List<JCTree> defs)
ClassDef in interface JCTree.Factorypublic 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)
public JCTree.JCMethodDecl MethodDef(JCTree.JCModifiers mods, Name name, JCTree.JCExpression restype, List<JCTree.JCTypeParameter> typarams, JCTree.JCVariableDecl recvparam, List<JCTree.JCVariableDecl> params, List<JCTree.JCExpression> thrown, JCTree.JCBlock body, JCTree.JCExpression defaultValue)
MethodDef in interface JCTree.Factorypublic JCTree.JCVariableDecl VarDef(JCTree.JCModifiers mods, Name name, JCTree.JCExpression vartype, JCTree.JCExpression init)
VarDef in interface JCTree.Factorypublic JCTree.JCVariableDecl ReceiverVarDef(JCTree.JCModifiers mods, JCTree.JCExpression name, JCTree.JCExpression vartype)
public JCTree.JCSkip Skip()
Skip in interface JCTree.Factorypublic JCTree.JCBlock Block(long flags, List<JCTree.JCStatement> stats)
Block in interface JCTree.Factorypublic JCTree.JCDoWhileLoop DoLoop(JCTree.JCStatement body, JCTree.JCExpression cond)
DoLoop in interface JCTree.Factorypublic JCTree.JCWhileLoop WhileLoop(JCTree.JCExpression cond, JCTree.JCStatement body)
WhileLoop in interface JCTree.Factorypublic JCTree.JCForLoop ForLoop(List<JCTree.JCStatement> init, JCTree.JCExpression cond, List<JCTree.JCExpressionStatement> step, JCTree.JCStatement body)
ForLoop in interface JCTree.Factorypublic JCTree.JCEnhancedForLoop ForeachLoop(JCTree.JCVariableDecl var, JCTree.JCExpression expr, JCTree.JCStatement body)
ForeachLoop in interface JCTree.Factorypublic JCTree.JCLabeledStatement Labelled(Name label, JCTree.JCStatement body)
Labelled in interface JCTree.Factorypublic JCTree.JCSwitch Switch(JCTree.JCExpression selector, List<JCTree.JCCase> cases)
Switch in interface JCTree.Factorypublic JCTree.JCCase Case(JCTree.JCExpression pat, List<JCTree.JCStatement> stats)
Case in interface JCTree.Factorypublic JCTree.JCSynchronized Synchronized(JCTree.JCExpression lock, JCTree.JCBlock body)
Synchronized in interface JCTree.Factorypublic JCTree.JCTry Try(JCTree.JCBlock body, List<JCTree.JCCatch> catchers, JCTree.JCBlock finalizer)
Try in interface JCTree.Factorypublic JCTree.JCTry Try(List<JCTree> resources, JCTree.JCBlock body, List<JCTree.JCCatch> catchers, JCTree.JCBlock finalizer)
Try in interface JCTree.Factorypublic JCTree.JCCatch Catch(JCTree.JCVariableDecl param, JCTree.JCBlock body)
Catch in interface JCTree.Factorypublic JCTree.JCConditional Conditional(JCTree.JCExpression cond, JCTree.JCExpression thenpart, JCTree.JCExpression elsepart)
Conditional in interface JCTree.Factorypublic 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.JCExpression expr)
Throw in interface JCTree.Factorypublic JCTree.JCAssert Assert(JCTree.JCExpression cond, JCTree.JCExpression detail)
Assert in interface JCTree.Factorypublic JCTree.JCMethodInvocation Apply(List<JCTree.JCExpression> typeargs, JCTree.JCExpression fn, List<JCTree.JCExpression> args)
Apply in interface JCTree.Factorypublic JCTree.JCNewClass NewClass(JCTree.JCExpression encl, List<JCTree.JCExpression> typeargs, JCTree.JCExpression clazz, List<JCTree.JCExpression> args, JCTree.JCClassDecl def)
NewClass in interface JCTree.Factorypublic JCTree.JCNewArray NewArray(JCTree.JCExpression elemtype, List<JCTree.JCExpression> dims, List<JCTree.JCExpression> elems)
NewArray in interface JCTree.Factorypublic JCTree.JCLambda Lambda(List<JCTree.JCVariableDecl> params, JCTree body)
public JCTree.JCParens Parens(JCTree.JCExpression expr)
Parens in interface JCTree.Factorypublic JCTree.JCAssign Assign(JCTree.JCExpression lhs, JCTree.JCExpression rhs)
Assign in interface JCTree.Factorypublic JCTree.JCAssignOp Assignop(JCTree.Tag opcode, JCTree lhs, JCTree rhs)
Assignop in interface JCTree.Factorypublic JCTree.JCUnary Unary(JCTree.Tag opcode, JCTree.JCExpression arg)
Unary in interface JCTree.Factorypublic JCTree.JCBinary Binary(JCTree.Tag opcode, JCTree.JCExpression lhs, JCTree.JCExpression rhs)
Binary in interface JCTree.Factorypublic JCTree.JCTypeCast TypeCast(JCTree clazz, JCTree.JCExpression expr)
TypeCast in interface JCTree.Factorypublic JCTree.JCInstanceOf TypeTest(JCTree.JCExpression expr, JCTree clazz)
TypeTest in interface JCTree.Factorypublic JCTree.JCArrayAccess Indexed(JCTree.JCExpression indexed, JCTree.JCExpression index)
Indexed in interface JCTree.Factorypublic JCTree.JCFieldAccess Select(JCTree.JCExpression selected, Name selector)
Select in interface JCTree.Factorypublic JCTree.JCMemberReference Reference(MemberReferenceTree.ReferenceMode mode, Name name, JCTree.JCExpression expr, List<JCTree.JCExpression> typeargs)
public JCTree.JCIdent Ident(Name name)
Ident in interface JCTree.Factorypublic JCTree.JCLiteral Literal(TypeTag tag, Object value)
Literal in interface JCTree.Factorypublic JCTree.JCPrimitiveTypeTree TypeIdent(TypeTag typetag)
TypeIdent in interface JCTree.Factorypublic JCTree.JCArrayTypeTree TypeArray(JCTree.JCExpression elemtype)
TypeArray in interface JCTree.Factorypublic JCTree.JCTypeApply TypeApply(JCTree.JCExpression clazz, List<JCTree.JCExpression> arguments)
TypeApply in interface JCTree.Factorypublic JCTree.JCTypeUnion TypeUnion(List<JCTree.JCExpression> components)
public JCTree.JCTypeIntersection TypeIntersection(List<JCTree.JCExpression> components)
public JCTree.JCTypeParameter TypeParameter(Name name, List<JCTree.JCExpression> bounds)
TypeParameter in interface JCTree.Factorypublic JCTree.JCTypeParameter TypeParameter(Name name, List<JCTree.JCExpression> bounds, List<JCTree.JCAnnotation> annos)
public JCTree.JCWildcard Wildcard(JCTree.TypeBoundKind kind, JCTree type)
Wildcard in interface JCTree.Factorypublic JCTree.TypeBoundKind TypeBoundKind(BoundKind kind)
TypeBoundKind in interface JCTree.Factorypublic JCTree.JCAnnotation Annotation(JCTree annotationType, List<JCTree.JCExpression> args)
Annotation in interface JCTree.Factorypublic JCTree.JCAnnotation TypeAnnotation(JCTree annotationType, List<JCTree.JCExpression> args)
public JCTree.JCModifiers Modifiers(long flags, List<JCTree.JCAnnotation> annotations)
Modifiers in interface JCTree.Factorypublic JCTree.JCModifiers Modifiers(long flags)
public JCTree.JCAnnotatedType AnnotatedType(List<JCTree.JCAnnotation> annotations, JCTree.JCExpression underlyingType)
public JCTree.JCErroneous Erroneous()
public JCTree.JCErroneous Erroneous(List<? extends JCTree> errs)
Erroneous in interface JCTree.Factorypublic JCTree.LetExpr LetExpr(List<JCTree.JCVariableDecl> defs, JCTree expr)
LetExpr in interface JCTree.Factorypublic 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)
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(Object value)
public JCTree.JCAnnotation Annotation(Attribute a)
public JCTree.JCAnnotation TypeAnnotation(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)
public Name paramName(int i)
public Name typaramName(int i)
Copyright © 2017 earcam. All rights reserved.