Package org.eclipse.m2m.atl.engine.vm

# Class ASMOperation

java.lang.Object
org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny
org.eclipse.m2m.atl.engine.vm.Operation
org.eclipse.m2m.atl.engine.vm.ASMOperation

public class ASMOperation extends Operation
The line number table contains a list of IDs (startLine:startColumn-endLine:endColumn) of source elements associated to a range of asm instructions. This list is depth first (first the condition is found, then the if). However, it is entered root first... so it is a LIFO. To find the source element (and its location, IDs being positions) associated to an asm instruction, we just have to find the first range matching the instruction.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`protected class`
`ASMOperation.Label`
`class`
`ASMOperation.LineNumberEntry`
`class`
`ASMOperation.LocalVariableEntry`

## Field Summary

Fields
Modifier and Type
Field
Description
`static ASMOclType`
`myType`

### Fields inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject

`nativeImpl`

## Constructor Summary

Constructors
Constructor
Description
`ASMOperation(ASM asm, String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addInstruction(ASMInstruction instruction)`
`void`
`addLabel(String labelName)`
`void`
`addLabeledInstruction(ASMInstructionWithOperand instruction, String labelName)`
`void`
`addLineNumberEntry(String id, int begin, int end)`
`void`
`addLocalVariableEntry(int slot, String name, int begin, int end)`
`void`
`addParameter(ASMParameter parameter)`
`void`
`addVariableInstruction(ASMInstructionWithOperand instruction, String varId)`
`void`
`beginLineNumberEntry(String id)`
`int`
`beginLocalVariableEntry(String id, String name)`
`void`
`endLineNumberEntry(String id)`
`int`
`endLocalVariableEntry(String id)`
`ASMOclAny`
`exec(StackFrame frame)`
`ASM`
`getASM()`
`String`
`getContextSignature()`
`ASMOclType`
`getContextType()`
`List`
`getInstructions()`
`List`
`getLineNumberTable()`
`List`
`getLocalVariableTable()`
`String`
`getName()`
`List`
`getParameters()`
`ASMOclType`
`getReturnType()`
`String`
`getSignature()`
`String`
`resolveLineNumber(int l)`
`String`
`resolveVariableName(int slot, int l)`
`void`
`setContext(String context)`
`void`
`setContextType(ASMOclType contextType)`
`String`
`toString()`

### Methods inherited from class org.eclipse.m2m.atl.engine.vm.Operation

`get`

### Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny

`asBag, asSequence, asSet, check, debug, findOperation, findOperation, getHelper, getNamedTargetFromSource, getOclAnyType, getType, invoke, invoke, invokeSuper, isHelper, oclIsKindOf, oclIsTypeOf, oclIsUndefined, oclType, operatorEQ, operatorNE, output, refGetValue, refImmediateComposite, refImmediateComposite, refInvokeOperation, refSetValue, refUnsetValue, set, setType, toString, unset`

### Methods inherited from class org.eclipse.m2m.atl.engine.vm.nativelib.ASMNativeObject

`getNativeImpl`

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

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

## Field Details

### myType

public static ASMOclType myType

## Constructor Details

### ASMOperation

public ASMOperation(ASM asm, String name)

## Method Details

### getName

public String getName()

Specified by:
  `getName` in class `Operation`

### setContext

public void setContext(String context)

### getContextSignature

public String getContextSignature()

Specified by:
  `getContextSignature` in class `Operation`

### addParameter

public void addParameter(ASMParameter parameter)

### getParameters

public List getParameters()

Specified by:
  `getParameters` in class `Operation`

### addInstruction

public void addInstruction(ASMInstruction instruction)

### addLabeledInstruction

public void addLabeledInstruction(ASMInstructionWithOperand instruction, String labelName)

### getInstructions

public List getInstructions()

### addLabel

public void addLabel(String labelName)

### addVariableInstruction

public void addVariableInstruction(ASMInstructionWithOperand instruction, String varId)

### getSignature

public String getSignature()

Specified by:
  `getSignature` in class `Operation`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### exec

public ASMOclAny exec(StackFrame frame)

Specified by:
  `exec` in class `Operation`

### beginLineNumberEntry

public void beginLineNumberEntry(String id)

### endLineNumberEntry

public void endLineNumberEntry(String id)

### addLineNumberEntry

public void addLineNumberEntry(String id, int begin, int end)

### getLineNumberTable

public List getLineNumberTable()

### resolveLineNumber

public String resolveLineNumber(int l)

### beginLocalVariableEntry

public int beginLocalVariableEntry(String id, String name)

### endLocalVariableEntry

public int endLocalVariableEntry(String id)

### addLocalVariableEntry

public void addLocalVariableEntry(int slot, String name, int begin, int end)

### getLocalVariableTable

public List getLocalVariableTable()

### resolveVariableName

public String resolveVariableName(int slot, int l)

### getASM

public ASM getASM()

### setContextType

public void setContextType(ASMOclType contextType)

### getReturnType

public ASMOclType getReturnType()

Specified by:
  `getReturnType` in class `Operation`

### getContextType

public ASMOclType getContextType()

Specified by:
  `getContextType` in class `Operation`