|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.jomc.ant.JomcTask
org.jomc.ant.JomcModelTask
public class JomcModelTask
Base class for executing model based tasks.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
JomcModelTask()
Creates a new JomcModelTask instance. |
Method Summary | |
---|---|
JomcModelTask |
clone()
Creates and returns a copy of this object. |
ModuleResourceType |
createModuleResource()
Creates a new moduleResource element instance. |
Model |
getModel(ModelContext context)
Gets a Model from a given ModelContext . |
String |
getModuleLocation()
Gets the location searched for modules. |
Set<ModuleResourceType> |
getModuleResources()
Gets a set of module resources. |
String |
getTransformerLocation()
Gets the location searched for transformers. |
boolean |
isModelObjectClasspathResolutionEnabled()
Gets a flag indicating model object class path resolution is enabled. |
boolean |
isModelResourceValidationEnabled()
Gets a flag indicating JAXP schema validation of model resources is enabled. |
ModelContext |
newModelContext(ClassLoader classLoader)
Creates a new ModelContext instance using a given class loader. |
void |
preExecuteTask()
Called by the execute method prior to the executeTask method. |
void |
setModelObjectClasspathResolutionEnabled(boolean value)
Sets the flag indicating model object class path resolution is enabled. |
void |
setModelResourceValidationEnabled(boolean value)
Sets the flag indicating JAXP schema validation of model resources is enabled. |
void |
setModuleLocation(String value)
Sets the location to search for modules. |
void |
setTransformerLocation(String value)
Sets the location to search for transformers. |
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 |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JomcModelTask()
JomcModelTask
instance.
Method Detail |
---|
public final String getModuleLocation()
null
.setModuleLocation(java.lang.String)
public final void setModuleLocation(String value)
value
- The new location to search for modules or null
.getModuleLocation()
public final String getTransformerLocation()
null
.setTransformerLocation(java.lang.String)
public final void setTransformerLocation(String value)
value
- The new location to search for transformers or null
.getTransformerLocation()
public final boolean isModelObjectClasspathResolutionEnabled()
true
, if model object class path resolution is enabled; false
, else.setModelObjectClasspathResolutionEnabled(boolean)
public final void setModelObjectClasspathResolutionEnabled(boolean value)
value
- true
, to enable model object class path resolution; false
, to disable model object
class path resolution.isModelObjectClasspathResolutionEnabled()
public Set<ModuleResourceType> getModuleResources()
This accessor method returns a reference to the live set, not a snapshot. Therefore any modification you make
to the returned set will be present inside the object. This is why there is no set
method for the
module resources property.
createModuleResource()
public ModuleResourceType createModuleResource()
moduleResource
element instance.
moduleResource
element instance.getModuleResources()
public final boolean isModelResourceValidationEnabled()
true
, if JAXP schema validation of model resources is enabled; false
, else.setModelResourceValidationEnabled(boolean)
public final void setModelResourceValidationEnabled(boolean value)
value
- true
, to enable JAXP schema validation of model resources; false
, to disable JAXP
schema validation of model resources.isModelResourceValidationEnabled()
public Model getModel(ModelContext context) throws org.apache.tools.ant.BuildException, ModelException
Model
from a given ModelContext
.
getModel
in class JomcTask
context
- The context to get a Model
from.
Model
from context
.
NullPointerException
- if contexŧ
is null
.
org.apache.tools.ant.BuildException
- if no model is found.
ModelException
- if getting the model fails.JomcTask.getModel()
,
isModelObjectClasspathResolutionEnabled()
,
JomcTask.isModelProcessingEnabled()
public void preExecuteTask() throws org.apache.tools.ant.BuildException
execute
method prior to the executeTask
method.
preExecuteTask
in class JomcTask
org.apache.tools.ant.BuildException
- if execution fails.JomcTask.execute()
public ModelContext newModelContext(ClassLoader classLoader) throws ModelException
ModelContext
instance using a given class loader.
newModelContext
in class JomcTask
classLoader
- The class loader to create a new ModelContext
instance with.
ModelContext
instance backed by classLoader
.
ModelException
- if creating a new ModelContext
instance fails.public JomcModelTask clone()
clone
in class JomcTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2005-2012 The JOMC Project. All Rights Reserved. |