gnu.jel
Class OPcall
java.lang.Object
|
+--gnu.jel.OP
|
+--gnu.jel.OPcall
- public class OPcall
- extends OP
A tree node, representing a method call (field/local variable load).
Field Summary |
java.lang.reflect.Member |
m
Holds method to be executed |
int |
nplv
local variable number (in case m=null), number of formal
parameters of the method to call otherwise. |
Constructor Summary |
OPcall(int lvarn,
java.lang.Class type)
Prepares access to the local variable (formal parameter) of method. |
OPcall(java.util.Stack paramOPs,
java.lang.reflect.Member m,
boolean aEval)
Prepares a new method/field call/get operation to be added to the code. |
Method Summary |
void |
compile(ClassFile cf)
Called to generate the code implementing this OP. |
java.lang.Object |
eval()
Attempts to evaluate this function. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m
public java.lang.reflect.Member m
- Holds method to be executed
nplv
public int nplv
- local variable number (in case m=null), number of formal
parameters of the method to call otherwise.
OPcall
public OPcall(java.util.Stack paramOPs,
java.lang.reflect.Member m,
boolean aEval)
throws CompilationException
- Prepares a new method/field call/get operation to be added to the code.
- Parameters:
paramOPs
- stack holding the operandsm
- method/field to call/get.aEval
- indicates if the method call should be attempted
at the compile time
OPcall
public OPcall(int lvarn,
java.lang.Class type)
- Prepares access to the local variable (formal parameter) of method.
- Parameters:
lvar
- local variable number.type
- local variable type.
eval
public java.lang.Object eval()
throws java.lang.Exception
- Attempts to evaluate this function.
- Overrides:
eval
in class OP
- Parameters:
list
- is the list of OPs this one belong to,
if eval is unsuccessful this list is not modified.
compile
public void compile(ClassFile cf)
- Description copied from class:
OP
- Called to generate the code implementing this OP.
- Overrides:
compile
in class OP
- Following copied from class:
gnu.jel.OP
- Parameters:
cf
- class file with a new open method to write the code into.