## org.eclipse.m2m.atl.core.launch
Interface ILauncher

All Known Implementing Classes:
  EMFVMLauncher, EMFVMUILauncher, ProfilerLauncher, 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
`static java.lang.String` `DEBUG_MODE` A launch in a special debug mode (value `"debug"`).
`static java.lang.String` `RUN_MODE` A launch in a normal, non-debug mode(value `"run"`).

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

Field Detail

### RUN_MODE

    static final java.lang.String RUN_MODE

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

  See Also:
    Constant Field Values

### DEBUG_MODE

    static final java.lang.String DEBUG_MODE

  A launch in a special debug mode (value `"debug"`).

  See Also:
    Constant Field Values

Method Detail

### getName

    java.lang.String getName()

  Returns the `ILauncher` name.

  Returns:
    the `ILauncher` name

### addInModel

    void addInModel(IModel model,
                    java.lang.String name,
                    java.lang.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,
                     java.lang.String name,
                     java.lang.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,
                       java.lang.String name,
                       java.lang.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(java.lang.String name,
                    java.lang.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(java.util.Map<java.lang.String,java.lang.Object> options)

  Initialize the launcher.

  Parameters:
    `options` - initialization options

### launch

    java.lang.Object launch(java.lang.String mode,
                            org.eclipse.core.runtime.IProgressMonitor monitor,
                            java.util.Map<java.lang.String,java.lang.Object> options,
                            java.lang.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

    java.lang.Object loadModule(java.io.InputStream inputStream)

  Loads a transformation module from an `InputStream`.

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

### getModel

    IModel getModel(java.lang.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

    java.lang.Object getLibrary(java.lang.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

    java.lang.String getDefaultModelFactoryName()

  Returns the default ModelFactory name.

  Returns:
    the default ModelFactory name

### getModes

    java.lang.String[] getModes()

  Returns the supported modes.

  Returns:
    the supported modes

Copyright 2007 IBM Corporation and others. All Rights Reserved.