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 Object
The abstract Operation class.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`maxLocals`
`protected String`
`name`

## Constructor Summary

Constructors
Constructor
Description
`Operation(int maxLocals)`
Deprecated.
use `Operation(int, String)` instead
`Operation(int maxLocals, String name)`
Creates a new operation.

## Method Summary

Modifier and Type
Method
Description
`abstract Object`
`exec(AbstractStackFrame frame)`
Executes an operation.
`List<?>`
`getInstructions()`
`int`
`getMaxLocals()`
`String`
`getName()`
`String`
`resolveLineNumber(int l)`
Returns the line at the specified number.
`String`
`resolveVariableName(int slot, int l)`
Resolves a variable name by its slot number and its index.
`void`
`setName(String name)`

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

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

## Field Details

### maxLocals

protected int maxLocals

### name

protected String name

## Constructor Details

### Operation

public Operation(int maxLocals, 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 Details

### setName

public void setName(String name)

### exec

public abstract Object exec(AbstractStackFrame frame)
Executes an operation.

Parameters:
  `frame` - the frame for execution
Returns:
  the result

### getMaxLocals

public int getMaxLocals()

### getName

public String getName()

### getInstructions

public List<?> getInstructions()

### resolveLineNumber

public 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 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