|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NewObjectInstruction
x = new C(z1, ..., zn), including for anonymous inner classes. Notice that the code for anonymous inner classes does not become part of the three-address code representation of the surrounding method.
ClassInstanceCreation
Method Summary | |
---|---|
ASTNode |
getNode()
Returns the node this instruction is for. |
Variable |
getOuterObjectSpecifierOperand()
Returns the outer object specifier, if any. |
boolean |
hasOuterObjectSpecifier()
Indicates whether there is an outer object specifier that is permitted by the Java language syntax. |
boolean |
isAnonClassType()
Indicates whether this instruction instantiates an anonymous class. |
ITypeBinding |
resolveInstantiatedType()
Resolves the instantiated type, which will usually be a class. |
Methods inherited from interface edu.cmu.cs.crystal.tac.model.AssignmentInstruction |
---|
getTarget |
Methods inherited from interface edu.cmu.cs.crystal.tac.model.TACInstruction |
---|
transfer, transfer |
Methods inherited from interface edu.cmu.cs.crystal.tac.model.TACInvocation |
---|
getArgOperands, resolveBinding |
Methods inherited from interface edu.cmu.cs.crystal.tac.model.TACInstruction |
---|
transfer, transfer |
Method Detail |
---|
ASTNode getNode()
ClassInstanceCreation
. Usually,
one instruction exists per AST node, but can be more
when AST nodes are desugared, such as for post-increment.
getNode
in interface InvocationInstruction
getNode
in interface TACInstruction
TACInstruction.getNode()
boolean isAnonClassType()
true
if this instruction instantiates an anonymous class,
false
otherwise.ITypeBinding resolveInstantiatedType()
boolean hasOuterObjectSpecifier()
true
then
getOuterObjectSpecifierOperand()
will return a non-null
variable.
This method returns true
even if the outer object is
implicit in the original Java source.
It turns out that local and anonymous inner classes cannot legally
have an explicit outer object specifier, even though they capture the
surrounding receiver, and so this method returns false
for those classes.
true
if there is an outer object specifier,
false
otherwise.Variable getOuterObjectSpecifierOperand()
null
specifier is returned even if it is implicit
in the original Java program (but see hasOuterObjectSpecifier()
for discussion of local and anonymous inner classes).
null
if there is none.hasOuterObjectSpecifier()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |