Class EMFTVMLauncher
java.lang.Object
org.eclipse.m2m.atl.emftvm.launcher.compat.EMFTVMLauncher
- All Implemented Interfaces:
ILauncher
- Direct Known Subclasses:
EMFTVMUILauncher
The EMFVM implementation of the
ILauncher interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExecEnvstatic final StringThe Default model factory name to use.protected ModuleResolverprotected org.eclipse.emf.ecore.resource.ResourceSetprotected org.eclipse.emf.ecore.resource.ResourceSetprotected TimingDataFields inherited from interface org.eclipse.m2m.atl.core.launch.ILauncher
DEBUG_MODE, RUN_MODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInModel(IModel model, String name, String referenceModelName) Adds an input model to the transformation context.voidaddInOutModel(IModel model, String name, String referenceModelName) Adds an input/output model to the transformation context.voidaddLibrary(String name, Object library) Adds a preloaded library module to the transformation, or anInputStream.protected ModelAdds any model to the local map.voidaddOutModel(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.protected ModulegetModuleFromObject(Object module) Load a module if necessary.getName()Returns theILaunchername.voidinitialize(Map<String, Object> parameters) Initialize the launcher.protected ObjectinternalLaunch(VMMonitor tool, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String, Object> options, Object... modules) Launches the transformation with preloaded modules.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
-
MODEL_FACTORY_NAME
The Default model factory name to use.- See Also:
-
models
-
libraries
-
moduleResourceSet
protected org.eclipse.emf.ecore.resource.ResourceSet moduleResourceSet -
moduleResolver
-
execEnv
-
outputResourceSet
protected org.eclipse.emf.ecore.resource.ResourceSet outputResourceSet -
timingData
-
-
Constructor Details
-
EMFTVMLauncher
public EMFTVMLauncher()
-
-
Method Details
-
getName
Returns theILaunchername. -
addModel
Adds any model to the local map. -
addInModel
Adds an input model to the transformation context. This method is also used to load the metamodels used in this transformation.- Specified by:
addInModelin interfaceILauncher- 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- See Also:
-
addInOutModel
Adds an input/output model to the transformation context.- Specified by:
addInOutModelin interfaceILauncher- 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- See Also:
-
addOutModel
Adds an output model to the transformation context.- Specified by:
addOutModelin interfaceILauncher- 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- See Also:
-
addLibrary
Adds a preloaded library module to the transformation, or anInputStream.- Specified by:
addLibraryin interfaceILauncher- Parameters:
name- the name of the library as described in the main modulelibrary- the loaded library- See Also:
-
initialize
Initialize the launcher.- Specified by:
initializein interfaceILauncher- Parameters:
parameters- initialization options- See Also:
-
launch
public 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.- Specified by:
launchin interfaceILauncher- 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
- See Also:
-
internalLaunch
protected Object internalLaunch(VMMonitor tool, org.eclipse.core.runtime.IProgressMonitor monitor, Map<String, Object> options, Object... modules) Launches the transformation with preloaded modules.- Parameters:
tool- the execution toolmonitor- the progression monitoroptions- the launching optionsmodules- the transformation modules- Returns:
- the execution result
-
loadModule
Loads a transformation module from anInputStream.- Specified by:
loadModulein interfaceILauncher- Parameters:
inputStream- the input stream to load- Returns:
- the loaded module
- See Also:
-
getModuleFromObject
Load a module if necessary.- Parameters:
module- the givenModuleorInputStream.- Returns:
- the
Module
-
getModel
Returns a previously added model with the given name. -
getLibrary
Returns a previously added library with the given name.- Specified by:
getLibraryin interfaceILauncher- Parameters:
libraryName- the library name- Returns:
- a previously added library with the given name
- See Also:
-
getDefaultModelFactoryName
Returns the default ModelFactory name.- Specified by:
getDefaultModelFactoryNamein interfaceILauncher- Returns:
- the default ModelFactory name
- See Also:
-
getModes
Returns the supported modes.
-