|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A New
is an immutable representation of the use of the
new
operator to create a new instance of a class. In
addition to the type of the class being created, a New
has a
list of arguments to be passed to the constructor of the object and an
optional ClassBody
used to support anonymous classes.
Method Summary | |
ParsedClassType |
anonType()
The type object for anonymous classes, or null. |
New |
anonType(ParsedClassType anonType)
Set the type object for anonymous classes. |
java.util.List |
arguments()
Actual arguments to pass to the constructor. |
ProcedureCall |
arguments(java.util.List arguments)
Set the actual arguments to pass to the constructor. |
ClassBody |
body()
The class body for anonymous classes, or null. |
New |
body(ClassBody b)
Set the class body for anonymous classes. |
ConstructorInstance |
constructorInstance()
The constructor invoked by this expression. |
New |
constructorInstance(ConstructorInstance ci)
Set the constructor invoked by this expression. |
TypeNode |
objectType()
The type we are creating, possibly qualified by qualifier. |
New |
objectType(TypeNode t)
Set the type we are creating. |
Expr |
qualifier()
The qualifier expression for the type, or null. |
New |
qualifier(Expr qualifier)
Set the qualifier expression for the type. |
Methods inherited from interface polyglot.ast.Expr |
constantValue, isConstant, precedence, printSubExpr, printSubExpr, type |
Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren |
Methods inherited from interface polyglot.util.Copy |
copy |
Methods inherited from interface polyglot.ast.Typed |
type |
Methods inherited from interface polyglot.ast.Term |
acceptCFG, entry, exceptions, exceptions, reachable, reachable |
Methods inherited from interface polyglot.ast.ProcedureCall |
procedureInstance |
Method Detail |
public ParsedClassType anonType()
public New anonType(ParsedClassType anonType)
public ConstructorInstance constructorInstance()
public New constructorInstance(ConstructorInstance ci)
public Expr qualifier()
public New qualifier(Expr qualifier)
public TypeNode objectType()
public New objectType(TypeNode t)
public java.util.List arguments()
arguments
in interface ProcedureCall
Expr
.public ProcedureCall arguments(java.util.List arguments)
arguments
in interface ProcedureCall
arguments
- A list of Expr
.public ClassBody body()
public New body(ClassBody b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |