|
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.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.jet.rat.val.CompositeValue |
|---|
CompositeValue.SimpleVarGenerator |
| 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. |
Object[] |
getArguments()
Returns the arguments used to call the method |
Method |
getMethod()
Returns the method wrapped by this Denotable |
Denotable |
getReceiver()
Returns the receiver object of the 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. |
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.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 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 CompositeValuepublic Method getMethod()
public Object[] getArguments()
public Denotable getReceiver()
|
JET | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||