Package org.eclipse.m2m.atl.engine.emfvm.lib

## 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.

### Field Summary

Fields
`protected int` `maxLocals`
`protected java.lang.String` `name`

### Constructor Summary

Constructors
`Operation​(int maxLocals)` Deprecated. use `Operation(int, String)` instead
`Operation​(int maxLocals, java.lang.String name)` Creates a new operation.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### maxLocals

    protected int maxLocals

#### name

    protected java.lang.String name

### Constructor Detail

#### Operation

    public Operation​(int maxLocals,
                     java.lang.String name)

Creates a new operation.

Parameters:
  `maxLocals` - max locals
  `name` - the operation name

#### Operation

    public Operation​(int maxLocals)

Deprecated.
use `Operation(int, String)` instead
Creates 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 number
  `l` - the variable index
Returns:
  the variable name