jeops.expressions
Class MethodJavaExpr
java.lang.Object
|
+--jeops.expressions.JavaExpr
|
+--jeops.expressions.MethodJavaExpr
- public class MethodJavaExpr
- extends JavaExpr
This class models a method call in (our subset of) the java language.
- Version:
- 0.01 02 Mar 1999
- Author:
- Carlos Figueira Filho (csff@di.ufpe.br)
Constructor Summary |
MethodJavaExpr(JavaExpr prevExpr,
java.lang.String name,
JavaExpr[] parameters)
Class constructor, for methods whose object in which it is invoked
DOES come from another expression. |
MethodJavaExpr(java.lang.String objType,
java.lang.String objId,
java.lang.String name,
JavaExpr[] parameters)
Class constructor, for methods whose object in which it is invoked
does NOT come from another expression. |
Method Summary |
void |
dump(int spaces)
Prints the tree for the expression of this precondition. |
java.lang.Class |
getClasse()
Returns an object representing the class of this expression. |
java.lang.String |
methodName()
Returns the name of the method represented by this expression. |
java.lang.String |
objectIdent()
Returns the identifier of the object that receives the method call. |
java.lang.Class |
objectType()
Returns the class of the object that receives the method call. |
java.lang.String |
toString()
Returns a String representation of this expression. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
MethodJavaExpr
public MethodJavaExpr(java.lang.String objType,
java.lang.String objId,
java.lang.String name,
JavaExpr[] parameters)
throws java.lang.NoSuchMethodException,
NoSuchClassException
- Class constructor, for methods whose object in which it is invoked
does NOT come from another expression.
- Parameters:
objType
- the class of the object that receives the method call.objId
- the identifier of the object that receives the method call.name
- the method name.parameters
- the parameters passed to the method- Throws:
- java.lang.NoSuchMethodException - if there is no method with the given name and
parameters.
- NoSuchClassException - if there is no class with the given name.
MethodJavaExpr
public MethodJavaExpr(JavaExpr prevExpr,
java.lang.String name,
JavaExpr[] parameters)
throws java.lang.NoSuchMethodException
- Class constructor, for methods whose object in which it is invoked
DOES come from another expression.
- Parameters:
prevExpr
- the expression which results in the object that receives
this method call.name
- the method name.parameters
- the parameters passed to the methodtable
- the symbolic table for the rule.- Throws:
- java.lang.NoSuchMethodException - if there is no method with the given name and
parameters.
dump
public void dump(int spaces)
- Prints the tree for the expression of this precondition. Useful
for debugging.
- Overrides:
- dump in class JavaExpr
- Parameters:
spaces
- the identation for the printed output.
getClasse
public java.lang.Class getClasse()
- Returns an object representing the class of this expression.
- Overrides:
- getClasse in class JavaExpr
methodName
public java.lang.String methodName()
- Returns the name of the method represented by this expression.
objectIdent
public java.lang.String objectIdent()
- Returns the identifier of the object that receives the method call.
objectType
public java.lang.Class objectType()
- Returns the class of the object that receives the method call.
toString
public java.lang.String toString()
- Returns a String representation of this expression. Useful for debugging.
- Overrides:
- toString in class java.lang.Object
- Returns:
- a String representing this expression.