Package org.eclipse.m2m.atl.core.launch

# Interface ILauncher

All Known Implementing Classes:
  `EMFTVMLauncher`, `EMFTVMUILauncher`, `EMFVMLauncher`, `EMFVMUILauncher`, `ProfilerLauncher`, `RegularVMLauncher`

public interface ILauncher
The ILauncher interface defines a transformation launcher, and a set of associated options. To use all launchers in a generic way, you can use the `LauncherService` class.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEBUG_MODE`
A launch in a special debug mode (value `"debug"`).
`static final String`
`RUN_MODE`
A launch in a normal, non-debug mode(value `"run"`).

## Method Summary

Modifier and Type
Method
Description
`void`
`addInModel(IModel model, String name, String referenceModelName)`
Adds an input model to the transformation context.
`void`
`addInOutModel(IModel model, String name, String referenceModelName)`
Adds an input/output model to the transformation context.
`void`
`addLibrary(String name, Object library)`
Adds a preloaded library module to the transformation, or an `InputStream`.
`void`
`addOutModel(IModel model, String name, String referenceModelName)`
Adds an output model to the transformation context.
`String`
`getDefaultModelFactoryName()`
Returns the default ModelFactory name.
`Object`
`getLibrary(String libraryName)`
Returns a previously added library with the given name.
`IModel`
`getModel(String modelName)`
Returns a previously added model with the given name.
`String[]`
`getModes()`
Returns the supported modes.
`String`
`getName()`
Returns the `ILauncher` name.
`void`
`initialize(Map<String,Object> options)`
Initialize the launcher.
`Object`
`launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String,Object> options, Object... modules)`
Launches the transformation using the given parameters and the given set of preloaded modules, or `InputStream`.
`Object`
`loadModule(InputStream inputStream)`
Loads a transformation module from an `InputStream`.

## Field Details

### RUN_MODE

static final String RUN_MODE
A launch in a normal, non-debug mode(value `"run"`).

See Also:
  - Constant Field Values

### DEBUG_MODE

static final String DEBUG_MODE
A launch in a special debug mode (value `"debug"`).

See Also:
  - Constant Field Values

## Method Details

### getName

String getName()
Returns the `ILauncher` name.

Returns:
  the `ILauncher` name

### addInModel

void addInModel(IModel model, String name, String referenceModelName)
Adds an input model to the transformation context. This method is also used to load the metamodels used in this transformation.

Parameters:
  `model` - the loaded model
  `name` - the name of the model as described in the main module
  `referenceModelName` - the name of the metamodel as described in the main module

### addOutModel

void addOutModel(IModel model, String name, String referenceModelName)
Adds an output model to the transformation context.

Parameters:
  `model` - the loaded model
  `name` - the name of the model as described in the main module
  `referenceModelName` - the name of the metamodel as described in the main module

### addInOutModel

void addInOutModel(IModel model, String name, String referenceModelName)
Adds an input/output model to the transformation context.

Parameters:
  `model` - the loaded model
  `name` - the name of the model as described in the main module
  `referenceModelName` - the name of the metamodel as described in the main module

### addLibrary

void addLibrary(String name, Object library)
Adds a preloaded library module to the transformation, or an `InputStream`.

Parameters:
  `library` - the loaded library
  `name` - the name of the library as described in the main module

### initialize

void initialize(Map<String,Object> options)
Initialize the launcher.

Parameters:
  `options` - initialization options

### launch

Object launch(String mode, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String,Object> options, Object... modules)
Launches the transformation using the given parameters and the given set of preloaded modules, or `InputStream`.

Parameters:
  `mode` - the launching mode
  `monitor` - the progress monitor
  `options` - vm options
  `modules` - single module/ordered module set. A module set is used for superimposition, where the first module of the set is override by the next ones. A module can be passed as an InputStream or directly a module loaded by the loadModule method.
Returns:
  the transformation return result

### loadModule

Object loadModule(InputStream inputStream)
Loads a transformation module from an `InputStream`.

Parameters:
  `inputStream` - the input stream to load
Returns:
  the loaded module

### getModel

IModel getModel(String modelName)
Returns a previously added model with the given name.

Parameters:
  `modelName` - the model name
Returns:
  a previously added model with the given name

### getLibrary

Object getLibrary(String libraryName)
Returns a previously added library with the given name.

Parameters:
  `libraryName` - the library name
Returns:
  a previously added library with the given name

### getDefaultModelFactoryName

String getDefaultModelFactoryName()
Returns the default ModelFactory name.

Returns:
  the default ModelFactory name

### getModes

String[] getModes()
Returns the supported modes.

Returns:
  the supported modes