org.apache.tools.ant
public class UnknownElement extends Task
Constructor Summary | |
---|---|
UnknownElement(String elementName)
Creates an UnknownElement for the given element name.
|
Method Summary | |
---|---|
void | addChild(UnknownElement child)
Adds a child element to this element.
|
void | applyPreSet(UnknownElement u)
This is used then the realobject of the UE is a PreSetDefinition.
|
void | configure(Object realObject)
Configure the given object from this UnknownElement
|
void | execute()
Executes the real object if it's a task. |
List | getChildren() |
protected String | getComponentName() |
String | getNamespace() Return the namespace of the XML element associated with this component.
|
protected BuildException | getNotFoundException(String what, String elementName)
Returns a very verbose exception for when a task/data type cannot
be found.
|
String | getQName() Return the qname of the XML element associated with this component.
|
Object | getRealThing()
Return the configured object
|
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.
|
String | getTaskName()
Returns the name to use in logging messages.
|
RuntimeConfigurable | getWrapper()
Get the RuntimeConfigurable instance for this UnknownElement, containing
the configuration information.
|
protected void | handleChildren(Object parent, RuntimeConfigurable parentWrapper)
Creates child elements, creates children of the children
(recursively), and sets attributes of the child elements.
|
protected void | handleErrorFlush(String output)
Handles error output sent to System.err by this task or its real task.
|
protected void | handleErrorOutput(String output)
Handles error output sent to System.err by this task or its real task.
|
protected void | handleFlush(String output)
Handles output sent to System.out by this task or its real task.
|
protected int | handleInput(byte[] buffer, int offset, int length) |
protected void | handleOutput(String output)
Handles output sent to System.out by this task or its real task.
|
protected Object | makeObject(UnknownElement ue, RuntimeConfigurable w)
Creates a named task or data type. |
protected Task | makeTask(UnknownElement ue, RuntimeConfigurable w)
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. |
void | setNamespace(String namespace)
Set the namespace of the XML element associated with this component.
|
void | setQName(String qname) Set the namespace qname of the XML element.
|
boolean | similar(Object obj)
like contents equals, but ignores project |
Parameters: elementName The name of the unknown element.
Must not be null
.
Parameters: child The child element to add. Must not be null
.
Parameters: u an UnknownElement containing the attributes, elements and text
Parameters: realObject the real object this UnknownElement is representing.
Returns: the list of nested UnknownElements for this UnknownElement.
Returns: the component name - uses ProjectHelper#genComponentName()
Returns: Namespace URI used in the xmlns declaration.
Parameters: 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
.
Returns: a detailed description of what might have caused the problem.
Returns: namespace Qname used in the element declaration.
Returns: the real thing whatever it is
Since: ant 1.6
Returns: the name of the XML element which generated this unknown element.
Returns: a task instance or null
if the real object is not
a task.
Returns: the name to use in logging messages.
Returns: the configuration info.
Parameters: 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.
Throws: BuildException if the children cannot be configured.
Parameters: output The error output to log. Should not be null
.
Parameters: output The error output to log. Should not be null
.
Parameters: output The output to log. Should not be null
.
Since: Ant 1.6
See Also: (byte[], int, int)
Parameters: output The output to log. Should not be null
.
Parameters: ue The unknown element to create the real object for.
Must not be null
. w Ignored in this implementation.
Returns: the task or data type represented by the given unknown element.
Parameters: ue The UnknownElement to create the real task for.
Must not be null
. w Ignored.
Returns: the task specified by the given unknown element, or
null
if the task name is not recognised.
Throws: BuildException if the configuration fails
Parameters: namespace URI used in the xmlns declaration.
Parameters: qname the qualified name of the element
Parameters: obj the object to check against
Returns: true if this unknownelement has the same contents the other