Package org.eclipse.m2m.atl.emftvm.ant
Class EMFTVMTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.eclipse.m2m.atl.emftvm.ant.EMFTVMTask
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
CompileTask
,LoadModelTask
,RegisterMetamodelTask
,RunTask
,SaveModelTask
public abstract class EMFTVMTask extends org.apache.tools.ant.Task
General superclass for EMFTVM Ant tasks.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RESOURCE_SET
The EMFTVMResourceSet
reference from within Ant.
-
Constructor Summary
Constructors Constructor Description EMFTVMTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
execute()
Metamodel
getMetamodel(java.lang.String name)
Returns the loaded metamodel with the givenModel
getModel(java.lang.String name)
Returns the loaded model with the givenorg.eclipse.emf.ecore.resource.ResourceSet
getResourceSet()
Returns theResourceSet
object for this project.protected abstract void
innerExecute()
Performs the actual execution.void
setModel(java.lang.String name, Model model)
Sets a reference to the model by name.-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
RESOURCE_SET
public static final java.lang.String RESOURCE_SET
The EMFTVMResourceSet
reference from within Ant.- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
Returns theResourceSet
object for this project.- Returns:
- the
ResourceSet
object for this project.
-
getModel
public Model getModel(java.lang.String name)
Returns the loaded model with the givenname
.- Parameters:
name
- the model name- Returns:
- the loaded model with the given
name
-
getMetamodel
public Metamodel getMetamodel(java.lang.String name)
Returns the loaded metamodel with the givenname
.- Parameters:
name
- the metamodel name- Returns:
- the loaded metamodel with the given
name
-
setModel
public void setModel(java.lang.String name, Model model)
Sets a reference to the model by name.- Parameters:
name
- the model namemodel
- the model
-
execute
public final void execute() throws org.apache.tools.ant.BuildException
- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
-
innerExecute
protected abstract void innerExecute() throws java.lang.Exception
Performs the actual execution.- Throws:
java.lang.Exception
-
-