Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » [javadoc | source]
org.apache.tools.ant
public class: UnknownElement [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.UnknownElement

All Implemented Interfaces:
    Cloneable

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.
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Constructor:
 public UnknownElement(String elementName) 
    Creates an UnknownElement for the given element name.
    Parameters:
    elementName - The name of the unknown element. Must not be null.
Method from org.apache.tools.ant.UnknownElement Summary:
addChild,   applyPreSet,   configure,   copy,   execute,   getChildren,   getComponentName,   getNamespace,   getNotFoundException,   getQName,   getRealThing,   getTag,   getTask,   getTaskName,   getWrapper,   handleChildren,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   makeObject,   makeTask,   maybeConfigure,   setNamespace,   setQName,   setRealThing,   similar
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.UnknownElement Detail:
 public  void addChild(UnknownElement child) 
    Adds a child element to this element.
 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.
 public  void configure(Object realObject) 
    Configure the given object from this UnknownElement
 public UnknownElement copy(Project newProject) 
    Make a copy of the unknown element and set it in the new project.
 public  void execute() 
    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.
 public List getChildren() 
 protected String getComponentName() 
 public String getNamespace() 
    Return the namespace of the XML element associated with this component.
 protected BuildException getNotFoundException(String what,
    String name) 
    Returns a very verbose exception for when a task/data type cannot be found.
 public String getQName() 
    Return the qname of the XML element associated with this component.
 public Object getRealThing() 
    Return the configured object
 public String getTag() 
    Returns the name of the XML element which generated this unknown element.
 public Task getTask() 
    Returns the task instance after it has been created and if it is a task.
 public String getTaskName() 
    Returns the name to use in logging messages.
 public RuntimeConfigurable getWrapper() 
    Get the RuntimeConfigurable instance for this UnknownElement, containing the configuration information.
 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.
 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) throws IOException 
    Delegate to realThing if present and if it as task.
 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. If the real object is a task, it is configured up to the init() stage.
 protected Task makeTask(UnknownElement ue,
    RuntimeConfigurable w) 
    Creates a named task and configures it up to the init() stage.
 public  void maybeConfigure() throws BuildException 
    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.
 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.
 public  void setQName(String qname) 
    Set the namespace qname of the XML element. This method is typically called by the XML processor.
 public  void setRealThing(Object realThing) 
    Set the configured object
 public boolean similar(Object obj) 
    like contents equals, but ignores project