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

## Class ASMEmitter

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

    public class ASMEmitter
    extends java.lang.Object

This class is used by ATL compiler to create an ASM file.

### Field Summary

Fields
`static java.lang.String` `DIRECT_COMPILATION`

### Constructor Summary

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

### Method Summary

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

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

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

### Field Detail

#### DIRECT_COMPILATION

    public static final java.lang.String DIRECT_COMPILATION

See Also:
  Constant Field Values

### Constructor Detail

#### ASMEmitter

    public ASMEmitter()

Creates a new `ASMEmitter`.

### Method Detail

#### newASM

    public void newASM​(java.lang.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​(java.lang.String name)

Wraps to ASM methods.

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

#### addField

    public void addField​(java.lang.String name,
                         java.lang.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​(java.lang.String name)

#### addOperationWithoutLVE

    public void addOperationWithoutLVE​(java.lang.String name)

#### setContext

    public void setContext​(java.lang.String type)

#### addParameter

    public void addParameter​(java.lang.String name,
                             java.lang.String type)

#### addParameterWithoutLVE

    public void addParameterWithoutLVE​(java.lang.String name,
                                       java.lang.String type)

#### beginLineNumberEntry

    public void beginLineNumberEntry​(java.lang.String id)

#### endLineNumberEntry

    public void endLineNumberEntry​(java.lang.String id)

#### addLineNumberEntry

    public void addLineNumberEntry​(java.lang.String id,
                                   int begin,
                                   int end)

#### beginLocalVariableEntry

    public void beginLocalVariableEntry​(java.lang.String id,
                                        java.lang.String name)

#### endLocalVariableEntry

    public void endLocalVariableEntry​(java.lang.String id)

#### addLocalVariableEntry

    public void addLocalVariableEntry​(int slot,
                                      java.lang.String name,
                                      int begin,
                                      int end)

#### emitSimple

    public void emitSimple​(java.lang.String mnemonic)

#### emit

    public void emit​(java.lang.String mnemonic,
                     java.lang.String param)

#### emitWithoutLabel

    public void emitWithoutLabel​(java.lang.String mnemonic,
                                 java.lang.String param)

#### getASM

    public ASM getASM()

#### setVersion

    public void setVersion​(java.lang.String version)

#### dumpASM

    public void dumpASM​(java.lang.String fileName)

Writes the `ASM` to a file.

Parameters:
  `fileName` - the file where to write