com.sun.tools.javac.tree
Class TreeMaker

java.lang.Object
  extended by com.sun.tools.javac.tree.TreeMaker
All Implemented Interfaces:
JCTree.Factory

public class TreeMaker
extends java.lang.Object
implements JCTree.Factory

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.
 
Method Summary
 JCTree.JCAnnotation Annotation(Attribute a)
          Create an annotation tree from an attribute.
 JCTree.JCAnnotation Annotation(JCTree annotationType, List<JCTree.JCExpression> args)
           
 List<JCTree.JCAnnotation> Annotations(List<Attribute.Compound> attributes)
          Create annotation trees from annotations.
 JCTree.JCClassDecl AnonymousClassDef(JCTree.JCModifiers mods, List<JCTree> defs)
           
 JCTree.JCMethodInvocation App(JCTree.JCExpression meth)
          Create a no-arg method invocation from a method tree
 JCTree.JCMethodInvocation App(JCTree.JCExpression meth, List<JCTree.JCExpression> args)
          Create a method invocation from a method tree and a list of argument trees.
 JCTree.JCMethodInvocation Apply(List<JCTree.JCExpression> typeargs, JCTree.JCExpression fn, List<JCTree.JCExpression> args)
           
 JCTree.JCAssert Assert(JCTree.JCExpression cond, JCTree.JCExpression detail)
           
 JCTree.JCAssign Assign(JCTree.JCExpression lhs, JCTree.JCExpression rhs)
           
 JCTree.JCStatement Assignment(Symbol v, JCTree.JCExpression rhs)
          Construct an assignment from a variable symbol and a right hand side.
 JCTree.JCAssignOp Assignop(int opcode, JCTree lhs, JCTree rhs)
           
 TreeMaker at(int pos)
          Reassign current position.
 TreeMaker at(JCDiagnostic.DiagnosticPosition pos)
          Reassign current position.
 JCTree.JCBinary Binary(int opcode, JCTree.JCExpression lhs, JCTree.JCExpression rhs)
           
 JCTree.JCBlock Block(long flags, List<JCTree.JCStatement> stats)
           
 JCTree.JCExpression BracketExpr(JCTree.JCExpression body)
           
 JCTree.JCExpression BracketStat(List<JCTree.JCStatement> body)
           
 JCTree.JCBreak Break(Name label)
           
 JCTree.JCStatement Call(JCTree.JCExpression apply)
          Wrap a method invocation in an expression statement or return statement, depending on whether the method invocation expression's type is void.
 JCTree.JCCase Case(JCTree.JCExpression pat, List<JCTree.JCStatement> stats)
           
 JCTree.JCCatch Catch(JCTree.JCVariableDecl param, JCTree.JCBlock body)
           
 JCTree.JCClassDecl ClassDef(JCTree.JCModifiers mods, Name name, List<JCTree.JCTypeParameter> typarams, JCTree extending, List<JCTree.JCExpression> implementing, List<JCTree> defs)
           
 JCTree.JCExpression ClassLiteral(Symbol.ClassSymbol clazz)
          Create a tree representing a class literal.
 JCTree.JCExpression ClassLiteral(Type t)
          Create a tree representing a class literal.
 JCTree.JCConditional Conditional(JCTree.JCExpression cond, JCTree.JCExpression thenpart, JCTree.JCExpression elsepart)
           
 JCTree.JCContinue Continue(Name label)
           
 JCTree.JCExpression Create(Symbol ctor, List<JCTree.JCExpression> args)
          Create a method invocation from a method tree and a list of argument trees.
 JCTree.JCDoWhileLoop DoLoop(JCTree.JCStatement body, JCTree.JCExpression cond)
           
 JCTree.JCErroneous Erroneous()
           
 JCTree.JCErroneous Erroneous(List<? extends JCTree> errs)
           
 JCTree.JCExpression EscapeExpr(JCTree.JCExpression body)
           
 JCTree.JCStatement EscapeStat(JCTree.JCExpression body)
           
 JCTree.JCExpressionStatement Exec(JCTree.JCExpression expr)
           
 JCTree.JCEnhancedForLoop ForeachLoop(JCTree.JCVariableDecl var, JCTree.JCExpression expr, JCTree.JCStatement body)
           
 JCTree.JCForLoop ForLoop(List<JCTree.JCStatement> init, JCTree.JCExpression cond, List<JCTree.JCExpressionStatement> step, JCTree.JCStatement body)
           
 TreeMaker forToplevel(JCTree.JCCompilationUnit toplevel)
          Create a new tree maker for a given toplevel.
 JCTree.JCExpression Ident(JCTree.JCVariableDecl param)
          Create an identifier that refers to the variable declared in given variable declaration.
 JCTree.JCIdent Ident(Name name)
           
 JCTree.JCIdent Ident(Symbol sym)
          Create an identifier from a symbol.
 List<JCTree.JCExpression> Idents(List<JCTree.JCVariableDecl> params)
          Create a list of identifiers referring to the variables declared in given list of variable declarations.
 JCTree.JCIf If(JCTree.JCExpression cond, JCTree.JCStatement thenpart, JCTree.JCStatement elsepart)
           
 JCTree.JCImport Import(JCTree qualid, boolean importStatic)
           
 JCTree.JCArrayAccess Indexed(JCTree.JCExpression indexed, JCTree.JCExpression index)
           
 JCTree.JCArrayAccess Indexed(Symbol v, JCTree.JCExpression index)
          Construct an index expression from a variable and an expression.
static TreeMaker instance(Context context)
          Get the TreeMaker instance.
(package private)  boolean isUnqualifiable(Symbol sym)
          Can given symbol be referred to in unqualified form?
 JCTree.JCLabeledStatement Labelled(Name label, JCTree.JCStatement body)
           
 JCTree.LetExpr LetExpr(JCTree.JCVariableDecl def, JCTree expr)
           
 JCTree.LetExpr LetExpr(List<JCTree.JCVariableDecl> defs, JCTree expr)
           
 JCTree.JCLiteral Literal(int tag, java.lang.Object value)
           
 JCTree.JCLiteral Literal(java.lang.Object value)
           
 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)
           
 JCTree.JCMethodDecl MethodDef(Symbol.MethodSymbol m, JCTree.JCBlock body)
          Create a method definition from a method symbol and a method body.
 JCTree.JCMethodDecl MethodDef(Symbol.MethodSymbol m, Type mtype, JCTree.JCBlock body)
          Create a method definition from a method symbol, method type and a method body.
 JCTree.JCModifiers Modifiers(long flags)
           
 JCTree.JCModifiers Modifiers(long flags, List<JCTree.JCAnnotation> annotations)
           
 JCTree.JCNewArray NewArray(JCTree.JCExpression elemtype, List<JCTree.JCExpression> dims, List<JCTree.JCExpression> elems)
           
 JCTree.JCNewClass NewClass(JCTree.JCExpression encl, List<JCTree.JCExpression> typeargs, JCTree.JCExpression clazz, List<JCTree.JCExpression> args, JCTree.JCClassDecl def)
           
 JCTree.JCVariableDecl Param(Name name, Type argtype, Symbol owner)
          Create a value parameter tree from its name, type, and owner.
 Name paramName(int i)
          The name of synthetic parameter number `i'.
 List<JCTree.JCVariableDecl> Params(List<Type> argtypes, Symbol owner)
          Create a a list of value parameter trees x0, ..., xn from a list of their types and an their owner.
 JCTree.JCParens Parens(JCTree.JCExpression expr)
           
 JCTree.JCExpression QualIdent(Symbol sym)
          Create a qualified identifier from a symbol, adding enough qualifications to make the reference unique.
 JCTree.JCReturn Return(JCTree.JCExpression expr)
           
 JCTree.JCFieldAccess Select(JCTree.JCExpression selected, Name selector)
           
 JCTree.JCExpression Select(JCTree.JCExpression base, Symbol sym)
          Create a selection node from a qualifier tree and a symbol.
private  JCTree.JCExpression Selectors(JCTree.JCExpression base, Symbol sym, Symbol limit)
           
 JCTree.JCSkip Skip()
           
 JCTree.JCIdent Super(Type t, Symbol.TypeSymbol owner)
          Create a tree representing `super', given its type and owner.
 JCTree.JCSwitch Switch(JCTree.JCExpression selector, List<JCTree.JCCase> cases)
           
 JCTree.JCSynchronized Synchronized(JCTree.JCExpression lock, JCTree.JCBlock body)
           
 JCTree.JCExpression This(Type t)
          Create a tree representing `this', given its type.
 JCTree.JCThrow Throw(JCTree expr)
           
 JCTree.JCCompilationUnit TopLevel(List<JCTree.JCAnnotation> packageAnnotations, JCTree.JCExpression pid, List<JCTree> defs)
          Create given tree node at current position.
 JCTree.JCTry Try(JCTree.JCBlock body, List<JCTree.JCCatch> catchers, JCTree.JCBlock finalizer)
           
 Name typaramName(int i)
          The name of synthetic type parameter number `i'.
 JCTree.JCExpression Type(Type t)
          Create a tree representing given type.
 JCTree.JCTypeApply TypeApply(JCTree.JCExpression clazz, List<JCTree.JCExpression> arguments)
           
 JCTree.JCArrayTypeTree TypeArray(JCTree.JCExpression elemtype)
           
 JCTree.TypeBoundKind TypeBoundKind(BoundKind kind)
           
 JCTree.JCTypeCast TypeCast(JCTree clazz, JCTree.JCExpression expr)
           
 JCTree.JCTypeCast TypeCast(Type type, JCTree.JCExpression expr)
          Make an attributed type cast expression.
 JCTree.JCPrimitiveTypeTree TypeIdent(int typetag)
           
 JCTree.JCTypeParameter TypeParam(Name name, Type.TypeVar tvar)
          Create a type parameter tree from its name and type.
 JCTree.JCTypeParameter TypeParameter(Name name, List<JCTree.JCExpression> bounds)
           
 List<JCTree.JCTypeParameter> TypeParams(List<Type> typarams)
          Create a list of type parameter trees from a list of type variables.
 List<JCTree.JCExpression> Types(List<Type> ts)
          Create a list of trees representing given list of types.
 JCTree.JCInstanceOf TypeTest(JCTree.JCExpression expr, JCTree clazz)
           
 JCTree.JCUnary Unary(int opcode, JCTree.JCExpression arg)
           
 JCTree.JCVariableDecl VarDef(JCTree.JCModifiers mods, Name name, JCTree.JCExpression vartype, JCTree.JCExpression init)
           
 JCTree.JCVariableDecl VarDef(Symbol.VarSymbol v, JCTree.JCExpression init)
          Create a variable definition from a variable symbol and an initializer expression.
 JCTree.JCWhileLoop WhileLoop(JCTree.JCExpression cond, JCTree.JCStatement body)
           
 JCTree.JCWildcard Wildcard(JCTree.TypeBoundKind kind, JCTree type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

treeMakerKey

protected static final Context.Key<TreeMaker> treeMakerKey
The context key for the tree factory.


pos

public int pos
The position at which subsequent trees will be created.


toplevel

public JCTree.JCCompilationUnit toplevel
The toplevel tree to which created trees belong.


names

Names names
The current name table.


types

Types types

syms

Symtab syms
The current symbol table.


annotationBuilder

TreeMaker.AnnotationBuilder annotationBuilder
Constructor Detail

TreeMaker

protected TreeMaker(Context context)
Create a tree maker with null toplevel and NOPOS as initial position.


TreeMaker

TreeMaker(JCTree.JCCompilationUnit toplevel,
          Names names,
          Types types,
          Symtab syms)
Create a tree maker with a given toplevel and FIRSTPOS as initial position.

Method Detail

instance

public static TreeMaker instance(Context context)
Get the TreeMaker instance.


forToplevel

public TreeMaker forToplevel(JCTree.JCCompilationUnit toplevel)
Create a new tree maker for a given toplevel.


at

public TreeMaker at(int pos)
Reassign current position.


at

public TreeMaker at(JCDiagnostic.DiagnosticPosition pos)
Reassign current position.


TopLevel

public JCTree.JCCompilationUnit TopLevel(List<JCTree.JCAnnotation> packageAnnotations,
                                         JCTree.JCExpression pid,
                                         List<JCTree> defs)
Create given tree node at current position.

Specified by:
TopLevel in interface JCTree.Factory
Parameters:
defs - a list of ClassDef, Import, and Skip

Import

public JCTree.JCImport Import(JCTree qualid,
                              boolean importStatic)
Specified by:
Import in interface JCTree.Factory

ClassDef

public JCTree.JCClassDecl ClassDef(JCTree.JCModifiers mods,
                                   Name name,
                                   List<JCTree.JCTypeParameter> typarams,
                                   JCTree extending,
                                   List<JCTree.JCExpression> implementing,
                                   List<JCTree> defs)
Specified by:
ClassDef in interface JCTree.Factory

MethodDef

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)
Specified by:
MethodDef in interface JCTree.Factory

VarDef

public JCTree.JCVariableDecl VarDef(JCTree.JCModifiers mods,
                                    Name name,
                                    JCTree.JCExpression vartype,
                                    JCTree.JCExpression init)
Specified by:
VarDef in interface JCTree.Factory

Skip

public JCTree.JCSkip Skip()
Specified by:
Skip in interface JCTree.Factory

Block

public JCTree.JCBlock Block(long flags,
                            List<JCTree.JCStatement> stats)
Specified by:
Block in interface JCTree.Factory

BracketExpr

public JCTree.JCExpression BracketExpr(JCTree.JCExpression body)
Specified by:
BracketExpr in interface JCTree.Factory

BracketStat

public JCTree.JCExpression BracketStat(List<JCTree.JCStatement> body)
Specified by:
BracketStat in interface JCTree.Factory

EscapeExpr

public JCTree.JCExpression EscapeExpr(JCTree.JCExpression body)
Specified by:
EscapeExpr in interface JCTree.Factory

EscapeStat

public JCTree.JCStatement EscapeStat(JCTree.JCExpression body)
Specified by:
EscapeStat in interface JCTree.Factory

DoLoop

public JCTree.JCDoWhileLoop DoLoop(JCTree.JCStatement body,
                                   JCTree.JCExpression cond)
Specified by:
DoLoop in interface JCTree.Factory

WhileLoop

public JCTree.JCWhileLoop WhileLoop(JCTree.JCExpression cond,
                                    JCTree.JCStatement body)
Specified by:
WhileLoop in interface JCTree.Factory

ForLoop

public JCTree.JCForLoop ForLoop(List<JCTree.JCStatement> init,
                                JCTree.JCExpression cond,
                                List<JCTree.JCExpressionStatement> step,
                                JCTree.JCStatement body)
Specified by:
ForLoop in interface JCTree.Factory

ForeachLoop

public JCTree.JCEnhancedForLoop ForeachLoop(JCTree.JCVariableDecl var,
                                            JCTree.JCExpression expr,
                                            JCTree.JCStatement body)
Specified by:
ForeachLoop in interface JCTree.Factory

Labelled

public JCTree.JCLabeledStatement Labelled(Name label,
                                          JCTree.JCStatement body)
Specified by:
Labelled in interface JCTree.Factory

Switch

public JCTree.JCSwitch Switch(JCTree.JCExpression selector,
                              List<JCTree.JCCase> cases)
Specified by:
Switch in interface JCTree.Factory

Case

public JCTree.JCCase Case(JCTree.JCExpression pat,
                          List<JCTree.JCStatement> stats)
Specified by:
Case in interface JCTree.Factory

Synchronized

public JCTree.JCSynchronized Synchronized(JCTree.JCExpression lock,
                                          JCTree.JCBlock body)
Specified by:
Synchronized in interface JCTree.Factory

Try

public JCTree.JCTry Try(JCTree.JCBlock body,
                        List<JCTree.JCCatch> catchers,
                        JCTree.JCBlock finalizer)
Specified by:
Try in interface JCTree.Factory

Catch

public JCTree.JCCatch Catch(JCTree.JCVariableDecl param,
                            JCTree.JCBlock body)
Specified by:
Catch in interface JCTree.Factory

Conditional

public JCTree.JCConditional Conditional(JCTree.JCExpression cond,
                                        JCTree.JCExpression thenpart,
                                        JCTree.JCExpression elsepart)
Specified by:
Conditional in interface JCTree.Factory

If

public JCTree.JCIf If(JCTree.JCExpression cond,
                      JCTree.JCStatement thenpart,
                      JCTree.JCStatement elsepart)
Specified by:
If in interface JCTree.Factory

Exec

public JCTree.JCExpressionStatement Exec(JCTree.JCExpression expr)
Specified by:
Exec in interface JCTree.Factory

Break

public JCTree.JCBreak Break(Name label)
Specified by:
Break in interface JCTree.Factory

Continue

public JCTree.JCContinue Continue(Name label)
Specified by:
Continue in interface JCTree.Factory

Return

public JCTree.JCReturn Return(JCTree.JCExpression expr)
Specified by:
Return in interface JCTree.Factory

Throw

public JCTree.JCThrow Throw(JCTree expr)
Specified by:
Throw in interface JCTree.Factory

Assert

public JCTree.JCAssert Assert(JCTree.JCExpression cond,
                              JCTree.JCExpression detail)
Specified by:
Assert in interface JCTree.Factory

Apply

public JCTree.JCMethodInvocation Apply(List<JCTree.JCExpression> typeargs,
                                       JCTree.JCExpression fn,
                                       List<JCTree.JCExpression> args)
Specified by:
Apply in interface JCTree.Factory

NewClass

public JCTree.JCNewClass NewClass(JCTree.JCExpression encl,
                                  List<JCTree.JCExpression> typeargs,
                                  JCTree.JCExpression clazz,
                                  List<JCTree.JCExpression> args,
                                  JCTree.JCClassDecl def)
Specified by:
NewClass in interface JCTree.Factory

NewArray

public JCTree.JCNewArray NewArray(JCTree.JCExpression elemtype,
                                  List<JCTree.JCExpression> dims,
                                  List<JCTree.JCExpression> elems)
Specified by:
NewArray in interface JCTree.Factory

Parens

public JCTree.JCParens Parens(JCTree.JCExpression expr)
Specified by:
Parens in interface JCTree.Factory

Assign

public JCTree.JCAssign Assign(JCTree.JCExpression lhs,
                              JCTree.JCExpression rhs)
Specified by:
Assign in interface JCTree.Factory

Assignop

public JCTree.JCAssignOp Assignop(int opcode,
                                  JCTree lhs,
                                  JCTree rhs)
Specified by:
Assignop in interface JCTree.Factory

Unary

public JCTree.JCUnary Unary(int opcode,
                            JCTree.JCExpression arg)
Specified by:
Unary in interface JCTree.Factory

Binary

public JCTree.JCBinary Binary(int opcode,
                              JCTree.JCExpression lhs,
                              JCTree.JCExpression rhs)
Specified by:
Binary in interface JCTree.Factory

TypeCast

public JCTree.JCTypeCast TypeCast(JCTree clazz,
                                  JCTree.JCExpression expr)
Specified by:
TypeCast in interface JCTree.Factory

TypeTest

public JCTree.JCInstanceOf TypeTest(JCTree.JCExpression expr,
                                    JCTree clazz)
Specified by:
TypeTest in interface JCTree.Factory

Indexed

public JCTree.JCArrayAccess Indexed(JCTree.JCExpression indexed,
                                    JCTree.JCExpression index)
Specified by:
Indexed in interface JCTree.Factory

Select

public JCTree.JCFieldAccess Select(JCTree.JCExpression selected,
                                   Name selector)
Specified by:
Select in interface JCTree.Factory

Ident

public JCTree.JCIdent Ident(Name name)
Specified by:
Ident in interface JCTree.Factory

Literal

public JCTree.JCLiteral Literal(int tag,
                                java.lang.Object value)
Specified by:
Literal in interface JCTree.Factory

TypeIdent

public JCTree.JCPrimitiveTypeTree TypeIdent(int typetag)
Specified by:
TypeIdent in interface JCTree.Factory

TypeArray

public JCTree.JCArrayTypeTree TypeArray(JCTree.JCExpression elemtype)
Specified by:
TypeArray in interface JCTree.Factory

TypeApply

public JCTree.JCTypeApply TypeApply(JCTree.JCExpression clazz,
                                    List<JCTree.JCExpression> arguments)
Specified by:
TypeApply in interface JCTree.Factory

TypeParameter

public JCTree.JCTypeParameter TypeParameter(Name name,
                                            List<JCTree.JCExpression> bounds)
Specified by:
TypeParameter in interface JCTree.Factory

Wildcard

public JCTree.JCWildcard Wildcard(JCTree.TypeBoundKind kind,
                                  JCTree type)
Specified by:
Wildcard in interface JCTree.Factory

TypeBoundKind

public JCTree.TypeBoundKind TypeBoundKind(BoundKind kind)
Specified by:
TypeBoundKind in interface JCTree.Factory

Annotation

public JCTree.JCAnnotation Annotation(JCTree annotationType,
                                      List<JCTree.JCExpression> args)
Specified by:
Annotation in interface JCTree.Factory

Modifiers

public JCTree.JCModifiers Modifiers(long flags,
                                    List<JCTree.JCAnnotation> annotations)
Specified by:
Modifiers in interface JCTree.Factory

Modifiers

public JCTree.JCModifiers Modifiers(long flags)

Erroneous

public JCTree.JCErroneous Erroneous()

Erroneous

public JCTree.JCErroneous Erroneous(List<? extends JCTree> errs)
Specified by:
Erroneous in interface JCTree.Factory

LetExpr

public JCTree.LetExpr LetExpr(List<JCTree.JCVariableDecl> defs,
                              JCTree expr)
Specified by:
LetExpr in interface JCTree.Factory

AnonymousClassDef

public JCTree.JCClassDecl AnonymousClassDef(JCTree.JCModifiers mods,
                                            List<JCTree> defs)

LetExpr

public JCTree.LetExpr LetExpr(JCTree.JCVariableDecl def,
                              JCTree expr)

Ident

public JCTree.JCIdent Ident(Symbol sym)
Create an identifier from a symbol.


Select

public JCTree.JCExpression Select(JCTree.JCExpression base,
                                  Symbol sym)
Create a selection node from a qualifier tree and a symbol.

Parameters:
base - The qualifier tree.

QualIdent

public JCTree.JCExpression QualIdent(Symbol sym)
Create a qualified identifier from a symbol, adding enough qualifications to make the reference unique.


Ident

public JCTree.JCExpression Ident(JCTree.JCVariableDecl param)
Create an identifier that refers to the variable declared in given variable declaration.


Idents

public List<JCTree.JCExpression> Idents(List<JCTree.JCVariableDecl> params)
Create a list of identifiers referring to the variables declared in given list of variable declarations.


This

public JCTree.JCExpression This(Type t)
Create a tree representing `this', given its type.


ClassLiteral

public JCTree.JCExpression ClassLiteral(Symbol.ClassSymbol clazz)
Create a tree representing a class literal.


ClassLiteral

public JCTree.JCExpression ClassLiteral(Type t)
Create a tree representing a class literal.


Super

public JCTree.JCIdent Super(Type t,
                            Symbol.TypeSymbol owner)
Create a tree representing `super', given its type and owner.


App

public JCTree.JCMethodInvocation App(JCTree.JCExpression meth,
                                     List<JCTree.JCExpression> args)
Create a method invocation from a method tree and a list of argument trees.


App

public JCTree.JCMethodInvocation App(JCTree.JCExpression meth)
Create a no-arg method invocation from a method tree


Create

public JCTree.JCExpression Create(Symbol ctor,
                                  List<JCTree.JCExpression> args)
Create a method invocation from a method tree and a list of argument trees.


Type

public JCTree.JCExpression Type(Type t)
Create a tree representing given type.


Selectors

private JCTree.JCExpression Selectors(JCTree.JCExpression base,
                                      Symbol sym,
                                      Symbol limit)

Types

public List<JCTree.JCExpression> Types(List<Type> ts)
Create a list of trees representing given list of types.


VarDef

public JCTree.JCVariableDecl VarDef(Symbol.VarSymbol v,
                                    JCTree.JCExpression init)
Create a variable definition from a variable symbol and an initializer expression.


Annotations

public List<JCTree.JCAnnotation> Annotations(List<Attribute.Compound> attributes)
Create annotation trees from annotations.


Literal

public JCTree.JCLiteral Literal(java.lang.Object value)

Annotation

public JCTree.JCAnnotation Annotation(Attribute a)
Create an annotation tree from an attribute.


MethodDef

public JCTree.JCMethodDecl MethodDef(Symbol.MethodSymbol m,
                                     JCTree.JCBlock body)
Create a method definition from a method symbol and a method body.


MethodDef

public JCTree.JCMethodDecl MethodDef(Symbol.MethodSymbol m,
                                     Type mtype,
                                     JCTree.JCBlock body)
Create a method definition from a method symbol, method type and a method body.


TypeParam

public JCTree.JCTypeParameter TypeParam(Name name,
                                        Type.TypeVar tvar)
Create a type parameter tree from its name and type.


TypeParams

public List<JCTree.JCTypeParameter> TypeParams(List<Type> typarams)
Create a list of type parameter trees from a list of type variables.


Param

public JCTree.JCVariableDecl Param(Name name,
                                   Type argtype,
                                   Symbol owner)
Create a value parameter tree from its name, type, and owner.


Params

public List<JCTree.JCVariableDecl> Params(List<Type> argtypes,
                                          Symbol owner)
Create a a list of value parameter trees x0, ..., xn from a list of their types and an their owner.


Call

public JCTree.JCStatement Call(JCTree.JCExpression apply)
Wrap a method invocation in an expression statement or return statement, depending on whether the method invocation expression's type is void.


Assignment

public JCTree.JCStatement Assignment(Symbol v,
                                     JCTree.JCExpression rhs)
Construct an assignment from a variable symbol and a right hand side.


Indexed

public JCTree.JCArrayAccess Indexed(Symbol v,
                                    JCTree.JCExpression index)
Construct an index expression from a variable and an expression.


TypeCast

public JCTree.JCTypeCast TypeCast(Type type,
                                  JCTree.JCExpression expr)
Make an attributed type cast expression.


isUnqualifiable

boolean isUnqualifiable(Symbol sym)
Can given symbol be referred to in unqualified form?


paramName

public Name paramName(int i)
The name of synthetic parameter number `i'.


typaramName

public Name typaramName(int i)
The name of synthetic type parameter number `i'.