Modifier and Type | Field and Description |
---|---|
private List | children
List of child elements (UnknownElements). |
private final String | elementName
Holds the name of the task/type or nested child element of a task/type that hasn't been defined at parser time or has been redefined since original creation. |
private String | namespace
Holds the namespace of the element. |
private boolean | presetDefed
Specifies if a predefined definition has been done |
private String | qname
Holds the namespace qname of the element. |
private Object | realThing
The real object after it has been loaded. |
Access | Constructor and Description |
---|---|
public | UnknownElement(String
The name of the unknown element.
Must not be elementName)null .Creates an UnknownElement for the given element name. |
Modifier and Type | Method and Description |
---|---|
public void | addChild(UnknownElement
The child element to add. Must not be child)null .Adds a child element to this element. |
public void | applyPreSet(UnknownElement
an UnknownElement containing the attributes, elements and text u)This is used then the realobject of the UE is a PreSetDefinition. |
public void | |
public UnknownElement | |
public void | |
public List | |
protected String | |
public String | Returns: Namespace URI used in the xmlns declaration.Return the namespace of the XML element associated with this component. |
protected BuildException | Returns: a detailed description of what might have caused the problem.The kind of thing being created. For example, when
a task name could not be found, this would be
what, String "task" . Should not be null .The name of the element which could not be found.
Should not be name)null .Returns a very verbose exception for when a task/data type cannot be found. |
public String | Returns: namespace Qname used in the element declaration.Return the qname of the XML element associated with this component. |
public Object | |
public String | Returns: the name of the XML element which generated this unknown element.Returns the name of the XML element which generated this unknown element. |
public Task | Returns: a task instance ornull if the real object is not
a task.Returns the task instance after it has been created and if it is a task. |
public String | Returns: the name to use in logging messages.Overrides org. |
public RuntimeConfigurable | Returns: the configuration info.Overrides org. |
private boolean | Returns: whether the creation has been successfulTry to create a nested element of |
protected void | handleChildren(Object
The configured object for the parent.
Must not be parent, RuntimeConfigurable null .The wrapper containing child wrappers
to be configured. Must not be parentWrapper)null
if there are any children.Creates child elements, creates children of the children (recursively), and sets attributes of the child elements. |
protected void | handleErrorFlush(String
The error output to log. Should not be output)null .Overrides org. |
protected void | handleErrorOutput(String
The error output to log. Should not be output)null .Overrides org. |
protected void | handleFlush(String
The output to log. Should not be output)null .Overrides org. |
protected int | Returns: the number of bytes read.the buffer into which data is to be read. buffer, int the offset into the buffer at which data is stored. offset, int the amount of data to read. length)Overrides org. |
protected void | handleOutput(String
The output to log. Should not be output)null .Overrides org. |
protected Object | Returns: the task or data type represented by the given unknown element.The unknown element to create the real object for.
Must not be ue, RuntimeConfigurable null .Ignored in this implementation. w)Creates a named task or data type. |
protected Task | Returns: the task specified by the given unknown element, ornull if the task name is not recognised.The UnknownElement to create the real task for.
Must not be ue, RuntimeConfigurable null .Ignored. w)Creates a named task and configures it up to the init() stage. |
public void | maybeConfigure()
Overrides org. |
public void | setNamespace(String
URI used in the xmlns declaration. namespace)Set the namespace of the XML element associated with this component. |
public void | |
public void | |
public boolean |
children | back to summary |
---|---|
private List<UnknownElement> children List of child elements (UnknownElements). |
elementName | back to summary |
---|---|
private final String elementName Holds the name of the task/type or nested child element of a task/type that hasn't been defined at parser time or has been redefined since original creation. |
namespace | back to summary |
---|---|
private String namespace Holds the namespace of the element. |
presetDefed | back to summary |
---|---|
private boolean presetDefed Specifies if a predefined definition has been done |
qname | back to summary |
---|---|
private String qname Holds the namespace qname of the element. |
realThing | back to summary |
---|---|
private Object realThing The real object after it has been loaded. |
UnknownElement | back to summary |
---|---|
public UnknownElement(String elementName) Creates an UnknownElement for the given element name.
|
addChild | back to summary |
---|---|
public void addChild(UnknownElement child) Adds a child element to this element.
|
applyPreSet | back to summary |
---|---|
public void applyPreSet(UnknownElement u) This is used then the realobject of the UE is a PreSetDefinition. This is also used when a presetdef is used on a presetdef The attributes, elements and text are applied to this UE.
|
configure | back to summary |
---|---|
public void configure(Object realObject) Configure the given object from this UnknownElement
|
copy | back to summary |
---|---|
public UnknownElement copy(Project newProject) Make a copy of the unknown element and set it in the new project.
|
execute | back to summary |
---|---|
public void execute() Overrides org. Executes the real object if it's a task. If it's not a task (e.g. a data type) then this method does nothing. |
getChildren | back to summary |
---|---|
public List
|
getComponentName | back to summary |
---|---|
protected String getComponentName()
|
getNamespace | back to summary |
---|---|
public String getNamespace() Return the namespace of the XML element associated with this component.
|
getNotFoundException | back to summary |
---|---|
protected BuildException getNotFoundException(String what, String name) Returns a very verbose exception for when a task/data type cannot be found.
|
getQName | back to summary |
---|---|
public String getQName() Return the qname of the XML element associated with this component.
|
getRealThing | back to summary |
---|---|
public Object getRealThing() Return the configured object
|
getTag | back to summary |
---|---|
public String getTag() Returns the name of the XML element which generated this unknown element.
|
getTask | back to summary |
---|---|
public Task getTask() Returns the task instance after it has been created and if it is a task.
|
getTaskName | back to summary |
---|---|
public String getTaskName() Overrides org. Returns the name to use in logging messages.
|
getWrapper | back to summary |
---|---|
public RuntimeConfigurable getWrapper() Overrides org. Get the RuntimeConfigurable instance for this UnknownElement, containing the configuration information.
|
handleChild | back to summary |
---|---|
private boolean handleChild(String parentUri, IntrospectionHelper ih, Object parent, UnknownElement child, RuntimeConfigurable childWrapper) Try to create a nested element of
|
handleChildren | back to summary |
---|---|
protected void handleChildren(Object parent, RuntimeConfigurable parentWrapper) throws BuildException Creates child elements, creates children of the children (recursively), and sets attributes of the child elements.
|
handleErrorFlush | back to summary |
---|---|
protected void handleErrorFlush(String output) Overrides org. Handles error output sent to System.err by this task or its real task.
|
handleErrorOutput | back to summary |
---|---|
protected void handleErrorOutput(String output) Overrides org. Handles error output sent to System.err by this task or its real task.
|
handleFlush | back to summary |
---|---|
protected void handleFlush(String output) Overrides org. Handles output sent to System.out by this task or its real task.
|
handleInput | back to summary |
---|---|
protected int handleInput(byte[] buffer, int offset, int length) throws IOException Overrides org. Delegate to realThing if present and if it as task.
|
handleOutput | back to summary |
---|---|
protected void handleOutput(String output) Overrides org. Handles output sent to System.out by this task or its real task.
|
makeObject | back to summary |
---|---|
protected Object makeObject(UnknownElement ue, RuntimeConfigurable w) Creates a named task or data type. If the real object is a task, it is configured up to the init() stage.
|
makeTask | back to summary |
---|---|
protected Task makeTask(UnknownElement ue, RuntimeConfigurable w) Creates a named task and configures it up to the init() stage.
|
maybeConfigure | back to summary |
---|---|
public void maybeConfigure() throws BuildException Overrides org. Creates the real object instance and child elements, then configures the attributes and text of the real object. This unknown element is then replaced with the real object in the containing target's list of children.
|
setNamespace | back to summary |
---|---|
public void setNamespace(String namespace) Set the namespace of the XML element associated with this component. This method is typically called by the XML processor. If the namespace is "ant:current", the component helper is used to get the current antlib uri.
|
setQName | back to summary |
---|---|
public void setQName(String qname) Set the namespace qname of the XML element. This method is typically called by the XML processor.
|
setRealThing | back to summary |
---|---|
public void setRealThing(Object realThing) Set the configured object
|
similar | back to summary |
---|---|
public boolean similar(Object obj) like contents equals, but ignores project
|