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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 anInputStream
.void
addOutModel
(IModel model, String name, String referenceModelName) Adds an output model to the transformation context.Returns the default ModelFactory name.getLibrary
(String libraryName) Returns a previously added library with the given name.Returns a previously added model with the given name.String[]
getModes()
Returns the supported modes.getName()
Returns theILauncher
name.void
initialize
(Map<String, Object> options) Initialize the launcher.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, orInputStream
.loadModule
(InputStream inputStream) Loads a transformation module from anInputStream
.
-
Field Details
-
RUN_MODE
A launch in a normal, non-debug mode(value"run"
).- See Also:
-
DEBUG_MODE
A launch in a special debug mode (value"debug"
).- See Also:
-
-
Method Details
-
getName
String getName()Returns theILauncher
name.- Returns:
- the
ILauncher
name
-
addInModel
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 modelname
- the name of the model as described in the main modulereferenceModelName
- the name of the metamodel as described in the main module
-
addOutModel
Adds an output model to the transformation context.- Parameters:
model
- the loaded modelname
- the name of the model as described in the main modulereferenceModelName
- the name of the metamodel as described in the main module
-
addInOutModel
Adds an input/output model to the transformation context.- Parameters:
model
- the loaded modelname
- the name of the model as described in the main modulereferenceModelName
- the name of the metamodel as described in the main module
-
addLibrary
Adds a preloaded library module to the transformation, or anInputStream
.- Parameters:
library
- the loaded libraryname
- the name of the library as described in the main module
-
initialize
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, orInputStream
.- Parameters:
mode
- the launching modemonitor
- the progress monitoroptions
- vm optionsmodules
- 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
Loads a transformation module from anInputStream
.- Parameters:
inputStream
- the input stream to load- Returns:
- the loaded module
-
getModel
Returns a previously added model with the given name.- Parameters:
modelName
- the model name- Returns:
- a previously added model with the given name
-
getLibrary
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
-