|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.et.rat.val.CompositeValue
edu.utep.cs.et.rat.val.MethodCall
public class MethodCall
A class to represent a method call. A method call is represented as
a tuple of a method (Method), a receiver
(Denotable), and actual arguments (an
array of Denotables). The current
implementation assumes that the return type of the called method is
a reference type.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.utep.cs.et.rat.val.CompositeValue |
|---|
CompositeValue.SimpleVarGenerator |
| Field Summary | |
|---|---|
private Method |
method
The constructor to be called. |
private Denotable |
receiver
The receiver of the call. |
| Constructor Summary | |
|---|---|
MethodCall(Class type,
Method meth,
Denotable receiver,
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 method call. |
String[] |
code(VarGenerator varGen)
Returns Java source code that, if evaluated, constructs the object represented by this method call. |
Class |
getReturnType()
Returns the return type of this method call. |
boolean |
isEquivalentTo(Denotable other)
Returns true if the represented value is equivalent to the argument's represented value. |
private boolean |
isStatic()
Returns true if this is a static method call. |
String |
toString()
Returns the string representation of this method call. |
Object |
value()
Evaluates this method call and returns the result. |
| Methods inherited from class edu.utep.cs.et.rat.val.CompositeValue |
|---|
elems, getTypeName, hasEquals, isNull, type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final Method method
private final Denotable receiver
| Constructor Detail |
|---|
public MethodCall(Class type,
Method meth,
Denotable receiver,
Denotable[] args)
| Method Detail |
|---|
public Class getReturnType()
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(); x1.m(..., xi, ...);
code(VarGenerator)public String[] code(VarGenerator varGen)
Tn xn = new Tn(); xn.m(); ... T1 x1 = new T1(); x1.m(..., 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 CompositeValueprivate boolean isStatic()
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||