|
||||||||||
| 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.apache.tools.ant.UnknownElement
Wrapper class that holds all the information necessary to create a task or data type that did not exist when Ant started, or one which has had its definition updated to use a different implementation class.
| Field Summary |
| Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
| Constructor Summary | |
UnknownElement(java.lang.String elementName)
Creates an UnknownElement for the given element name. |
|
| Method Summary | |
void |
addChild(UnknownElement child)
Adds a child element to this element. |
void |
execute()
Executes the real object if it's a task. |
protected BuildException |
getNotFoundException(java.lang.String what,
java.lang.String elementName)
Returns a very verbose exception for when a task/data type cannot be found. |
java.lang.String |
getTag()
Returns the name of the XML element which generated this unknown element. |
Task |
getTask()
Returns the task instance after it has been created and if it is a task. |
java.lang.String |
getTaskName()
Returns the name to use in logging messages. |
protected void |
handleChildren(java.lang.Object parent,
RuntimeConfigurable parentWrapper)
Creates child elements, creates children of the children (recursively), and sets attributes of the child elements. |
protected void |
handleErrorFlush(java.lang.String line)
Handles error output sent to System.err by this task or its real task. |
protected void |
handleErrorOutput(java.lang.String line)
Handles error output sent to System.err by this task or its real task. |
protected void |
handleFlush(java.lang.String line)
Handles output sent to System.out by this task or its real task. |
protected void |
handleOutput(java.lang.String line)
Handles output sent to System.out by this task or its real task. |
protected java.lang.Object |
makeObject(UnknownElement ue,
RuntimeConfigurable w)
Creates a named task or data type. |
protected Task |
makeTask(UnknownElement ue,
RuntimeConfigurable w,
boolean onTopLevel)
Creates a named task and configures it up to the init() stage. |
void |
maybeConfigure()
Creates the real object instance and child elements, then configures the attributes and text of the real object. |
| Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, init, isInvalid, log, log, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UnknownElement(java.lang.String elementName)
elementName - The name of the unknown element.
Must not be null.| Method Detail |
public java.lang.String getTag()
public void maybeConfigure()
throws BuildException
maybeConfigure in class TaskBuildException - if the configuration failsprotected void handleOutput(java.lang.String line)
handleOutput in class Taskline - The line of output to log. Should not be null.protected void handleFlush(java.lang.String line)
handleFlush in class Taskline - The line of output to log. Should not be null.protected void handleErrorOutput(java.lang.String line)
handleErrorOutput in class Taskline - The error line to log. Should not be null.protected void handleErrorFlush(java.lang.String line)
handleErrorFlush in class Taskline - The error line to log. Should not be null.public void execute()
execute in class Taskpublic void addChild(UnknownElement child)
child - The child element to add. Must not be null.
protected void handleChildren(java.lang.Object parent,
RuntimeConfigurable parentWrapper)
throws BuildException
parent - The configured object for the parent.
Must not be null.parentWrapper - The wrapper containing child wrappers
to be configured. Must not be null
if there are any children.
BuildException - if the children cannot be configured.
protected java.lang.Object makeObject(UnknownElement ue,
RuntimeConfigurable w)
ue - The unknown element to create the real object for.
Must not be null.w - Ignored in this implementation.
protected Task makeTask(UnknownElement ue,
RuntimeConfigurable w,
boolean onTopLevel)
ue - The UnknownElement to create the real task for.
Must not be null.w - Ignored.onTopLevel - Whether or not this is definitely trying to create
a task. If this is true and the
task name is not recognised, a BuildException
is thrown.
null if the task name is not recognised and
onTopLevel is false.
protected BuildException getNotFoundException(java.lang.String what,
java.lang.String elementName)
what - The kind of thing being created. For example, when
a task name could not be found, this would be
"task". Should not be null.elementName - The name of the element which could not be found.
Should not be null.
public java.lang.String getTaskName()
getTaskName in class Taskpublic Task getTask()
null if the real object is not
a task.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||