Class Operation
- java.lang.Object
-
- org.eclipse.m2m.atl.engine.emfvm.lib.Operation
-
- Direct Known Subclasses:
ASMOperation
public abstract class Operation extends java.lang.ObjectThe 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.Objectexec(AbstractStackFrame frame)Executes an operation.java.util.List<?>getInstructions()intgetMaxLocals()java.lang.StringgetName()java.lang.StringresolveLineNumber(int l)Returns the line at the specified number.java.lang.StringresolveVariableName(int slot, int l)Resolves a variable name by its slot number and its index.voidsetName(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
-
-