Package org.eclipse.m2m.qvt.oml
Class TransformationExecutor
- java.lang.Object
-
- org.eclipse.m2m.qvt.oml.TransformationExecutor
-
public final class TransformationExecutor extends Object
A utility class that enables to execute existing transformation in the specified execution context.- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTransformationExecutor.BlackboxRegistrySupport for blackbox libraries in standalone mode.
-
Constructor Summary
Constructors Constructor Description TransformationExecutor(URI uri)Constructs the executor for the given transformation URI.TransformationExecutor(URI uri, EPackage.Registry registry)Constructs the executor for the given transformation URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Clean all resources associated with the executor.ExecutionDiagnosticexecute(ExecutionContext executionContext, ModelExtent... modelParameters)Executes the transformation referred by this executor using the given model parameters and execution context.DiagnosticloadTransformation()Attempts to load the transformation referred by this executor and checks if it is valid for execution.DiagnosticloadTransformation(org.eclipse.core.runtime.IProgressMonitor monitor)Attempts to load the transformation referred by this executor and checks if it is valid for execution.
-
-
-
Constructor Detail
-
TransformationExecutor
public TransformationExecutor(URI uri)
Constructs the executor for the given transformation URI.No attempt to resolve and load the transformation is done at this step
- Parameters:
uri- the URI of an existing transformation
-
TransformationExecutor
public TransformationExecutor(URI uri, EPackage.Registry registry)
Constructs the executor for the given transformation URI.No attempt to resolve and load the transformation is done at this step
- Parameters:
uri- the URI of an existing transformationregistry- a package registry of meta-models to be referenced by the executed transformation- Since:
- 3.0
-
-
Method Detail
-
loadTransformation
public Diagnostic loadTransformation()
Attempts to load the transformation referred by this executor and checks if it is valid for execution.Remark: Only the first performs the actual transformation loading, subsequent calls to this method will return the existing diagnostic.
- Returns:
- the diagnostic indicating possible problems of the load action
-
loadTransformation
public Diagnostic loadTransformation(org.eclipse.core.runtime.IProgressMonitor monitor)
Attempts to load the transformation referred by this executor and checks if it is valid for execution.Remark: Only the first performs the actual transformation loading, subsequent calls to this method will return the existing diagnostic.
- Parameters:
the- monitor indicating load progress and cancellation- Returns:
- the diagnostic indicating possible problems of the load action
- Since:
- 3.4
-
execute
public ExecutionDiagnostic execute(ExecutionContext executionContext, ModelExtent... modelParameters)
Executes the transformation referred by this executor using the given model parameters and execution context.- Parameters:
executionContext- the context object keeping the execution environment detailsmodelParameters- the actual model arguments to the transformation- Returns:
- the diagnostic object indicating the execution result status, also keeping the details of possible problems
- Throws:
IllegalArgumentException- if the context or any of the model parameters isnull
-
cleanup
public void cleanup()
Clean all resources associated with the executor.- Since:
- 3.5
-
-