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 theLauncherService
class.
-
-
Field Summary
Fields Modifier and Type Field Description 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 anInputStream
.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 theILauncher
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, orInputStream
.java.lang.Object
loadModule(java.io.InputStream inputStream)
Loads a transformation module from anInputStream
.
-
-
-
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
-
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 modelname
- the name of the model as described in the main modulereferenceModelName
- 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 modelname
- the name of the model as described in the main modulereferenceModelName
- 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 modelname
- the name of the model as described in the main modulereferenceModelName
- 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 anInputStream
.- Parameters:
library
- the loaded libraryname
- 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, 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
java.lang.Object loadModule(java.io.InputStream inputStream)
Loads a transformation module from anInputStream
.- 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
-
-