|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.jet.rat.val.CompositeValue
edu.utep.cs.jet.rat.val.ConstructorCall
public class ConstructorCall
A class to represent a constructor call. A constructor call is
represented as a tuple of a constructor
(Constructor) and arguments (an array of
Denotables).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.utep.cs.jet.rat.val.CompositeValue |
|---|
CompositeValue.SimpleVarGenerator |
| Constructor Summary | |
|---|---|
ConstructorCall(Constructor<?> con,
Denotable[] args)
Creates a new instance with the given constructor and arguments. |
|
| Method Summary | |
|---|---|
String |
code()
Returns a textual representation of the object denoted by this constructor call. |
String[] |
code(VarGenerator varGen)
Returns Java source code that, if evaluated, constructs the object represented by this constructor call. |
Object[] |
getArguments()
Returns the arguments used to call the constructor |
Constructor<?> |
getConstructor()
Returns the constructor wrapped by this Denotable |
boolean |
isEquivalentTo(Denotable other)
Returns true if the represented value is equivalent to the argument's represented value. |
String |
toString()
Returns the string representation of this method call. |
Object |
value()
Evaluates this constructor call and returns the result. |
| Methods inherited from class edu.utep.cs.jet.rat.val.CompositeValue |
|---|
elems, hasEquals, isNull, type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstructorCall(Constructor<?> con,
Denotable[] args)
| Method Detail |
|---|
public Object value()
public String toString()
toString in interface DenotabletoString in class Objectpublic String code()
x where: Tn xn = new Tn(); xn.m(); ... T1 x1 = new T1(..., xi, ...);
code(VarGenerator)public String[] code(VarGenerator varGen)
Tn xn = new Tn(); xn.m(); ... T1 x1 = new T1(..., xi, ...);The second element gives the name of the variable (e.g.,
x1) that contains the constructed object.
code in class CompositeValuecode(VarGenerator)public boolean isEquivalentTo(Denotable other)
isEquivalentTo in interface DenotableisEquivalentTo in class CompositeValuepublic Constructor<?> getConstructor()
public Object[] getArguments()
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||