Package org.eclipse.m2m.atl.engine.asm

# Class ASMEmitter

java.lang.Object
org.eclipse.m2m.atl.engine.asm.ASMEmitter

public class ASMEmitter extends Object
This class is used by ATL compiler to create an ASM file.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DIRECT_COMPILATION`

## Constructor Summary

Constructors
Constructor
Description
`ASMEmitter()`
Creates a new `ASMEmitter`.

## Method Summary

Modifier and Type
Method
Description
`void`
`addField(String name, String type)`
Wraps to ASM methods.
`void`
`addLineNumberEntry(String id, int begin, int end)`
`void`
`addLocalVariableEntry(int slot, String name, int begin, int end)`
`void`
`addOperation(String name)`
`void`
`addOperationWithoutLVE(String name)`
`void`
`addParameter(String name, String type)`
`void`
`addParameterWithoutLVE(String name, String type)`
`void`
`beginLineNumberEntry(String id)`
`void`
`beginLocalVariableEntry(String id, String name)`
`void`
`dumpASM(String fileName)`
Writes the `ASM` to a file.
`void`
`emit(String mnemonic, String param)`
`void`
`emitSimple(String mnemonic)`
`void`
`emitWithoutLabel(String mnemonic, String param)`
`void`
`endLineNumberEntry(String id)`
`void`
`endLocalVariableEntry(String id)`
`void`
`finishOperation()`
Finish the current Operation.
`ASM`
`getASM()`
`void`
`newASM(String name)`
Wraps to ASM methods.
`void`
`newUnnamedASM()`
Wraps to ASM methods.
`void`
`setContext(String type)`
`void`
`setName(String name)`
Wraps to ASM methods.
`void`
`setVersion(String version)`

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

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

## Field Details

### DIRECT_COMPILATION

public static final String DIRECT_COMPILATION

See Also:
  - Constant Field Values

## Constructor Details

### ASMEmitter

public ASMEmitter()
Creates a new `ASMEmitter`.

## Method Details

### newASM

public void newASM(String name)
Wraps to ASM methods.

Parameters:
  `name` - the `ASM` name
See Also:
  - `ASM`

### newUnnamedASM

public void newUnnamedASM()
Wraps to ASM methods.

See Also:
  - `ASM`

### setName

public void setName(String name)
Wraps to ASM methods.

Parameters:
  `name` - the `ASM` name
See Also:
  - `ASM`

### addField

public void addField(String name, String type)
Wraps to ASM methods.

Parameters:
  `name` - the `ASMField` name
  `type` - the `ASMField` type
See Also:
  - `ASM`

### finishOperation

public void finishOperation()
Finish the current Operation.

### addOperation

public void addOperation(String name)

### addOperationWithoutLVE

public void addOperationWithoutLVE(String name)

### setContext

public void setContext(String type)

### addParameter

public void addParameter(String name, String type)

### addParameterWithoutLVE

public void addParameterWithoutLVE(String name, String type)

### beginLineNumberEntry

public void beginLineNumberEntry(String id)

### endLineNumberEntry

public void endLineNumberEntry(String id)

### addLineNumberEntry

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

### beginLocalVariableEntry

public void beginLocalVariableEntry(String id, String name)

### endLocalVariableEntry

public void endLocalVariableEntry(String id)

### addLocalVariableEntry

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

### emitSimple

public void emitSimple(String mnemonic)

### emit

public void emit(String mnemonic, String param)

### emitWithoutLabel

public void emitWithoutLabel(String mnemonic, String param)

### getASM

public ASM getASM()

### setVersion

public void setVersion(String version)

### dumpASM

public void dumpASM(String fileName)
Writes the `ASM` to a file.

Parameters:
  `fileName` - the file where to write