public interface New extends Expr, ProcedureCall
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.Term.Instance
Modifier and Type | Method and Description |
---|---|
ParsedClassType |
anonType()
The type object for anonymous classes, or null.
|
New |
anonType(ParsedClassType anonType)
Set the type object for anonymous classes.
|
java.util.List<Expr> |
arguments()
Actual arguments to pass to the constructor.
|
New |
arguments(java.util.List<Expr> 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.
|
boolean |
isQualifierImplicit()
Is the qualifier implicit?
|
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.
|
New |
qualifierImplicit(boolean implicit)
Set whether the qualifier of this New is implicit.
|
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
procedureInstance
exceptions, exceptions, reachable, reachable
ParsedClassType anonType()
New anonType(ParsedClassType anonType)
ConstructorInstance constructorInstance()
New constructorInstance(ConstructorInstance ci)
Expr qualifier()
TypeNode objectType()
java.util.List<Expr> arguments()
arguments
in interface ProcedureCall
Expr
.New arguments(java.util.List<Expr> arguments)
arguments
in interface ProcedureCall
arguments
- A list of Expr
.ClassBody body()
boolean isQualifierImplicit()
New qualifierImplicit(boolean implicit)