Class Operation
- java.lang.Object
-
- org.eclipse.m2m.atl.engine.emfvm.lib.Operation
-
- Direct Known Subclasses:
ASMOperation
public abstract class Operation extends java.lang.Object
The abstract Operation class.
-
-
Constructor Summary
Constructors Constructor Description Operation(int maxLocals)
Deprecated.useOperation(int, String)
insteadOperation(int maxLocals, java.lang.String name)
Creates a new operation.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Object
exec(AbstractStackFrame frame)
Executes an operation.java.util.List<?>
getInstructions()
int
getMaxLocals()
java.lang.String
getName()
java.lang.String
resolveLineNumber(int l)
Returns the line at the specified number.java.lang.String
resolveVariableName(int slot, int l)
Resolves a variable name by its slot number and its index.void
setName(java.lang.String name)
-
-
-
Constructor Detail
-
Operation
public Operation(int maxLocals, java.lang.String name)
Creates a new operation.- Parameters:
maxLocals
- max localsname
- the operation name
-
Operation
public Operation(int maxLocals)
Deprecated.useOperation(int, String)
insteadCreates a new operation.- Parameters:
maxLocals
- max locals
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
-
exec
public abstract java.lang.Object exec(AbstractStackFrame frame)
Executes an operation.- Parameters:
frame
- the frame for execution- Returns:
- the result
-
getMaxLocals
public int getMaxLocals()
-
getName
public java.lang.String getName()
-
getInstructions
public java.util.List<?> getInstructions()
-
resolveLineNumber
public java.lang.String resolveLineNumber(int l)
Returns the line at the specified number.- Parameters:
l
- the line number- Returns:
- the line at the specified number
-
resolveVariableName
public java.lang.String resolveVariableName(int slot, int l)
Resolves a variable name by its slot number and its index.- Parameters:
slot
- the slot numberl
- the variable index- Returns:
- the variable name
-
-