org.apache.tools.ant.helper
Class ProjectHelper2.ElementHandler
- ProjectHelper2
public static class ProjectHelper2.ElementHandler
Handler for all project elements ( tasks, data types )
void | characters(char[] buf, int start, int count, AntXMLContext context) - Adds text to the task, using the wrapper
|
void | onEndElement(String uri, String tag, AntXMLContext context) - Handles the end of the element.
|
ProjectHelper2.AntHandler | onStartChild(String uri, String tag, String qname, Attributes attrs, AntXMLContext context) - Handles the start of an element within a target.
|
void | onStartElement(String uri, String tag, String qname, Attributes attrs, AntXMLContext context) - Initialisation routine called after handler creation
with the element name and attributes.
|
ElementHandler
public ElementHandler()
Constructor.
characters
public void characters(char[] buf,
int start,
int count,
AntXMLContext context)
throws SAXParseException
Adds text to the task, using the wrapper
- characters in interface ProjectHelper2.AntHandler
buf
- A character array of the text within the element.
Will not be null
.start
- The start element in the array.count
- The number of characters to read from the array.context
- The current context.
ProjectHelper.addText(Project,java.lang.Object,char[],int,int)
onEndElement
public void onEndElement(String uri,
String tag,
AntXMLContext context)
Handles the end of the element. This pops the wrapper from
the context.
- onEndElement in interface ProjectHelper2.AntHandler
uri
- The namespace URI for the element.tag
- The name of the element.context
- The current context.
onStartChild
public ProjectHelper2.AntHandler onStartChild(String uri,
String tag,
String qname,
Attributes attrs,
AntXMLContext context)
throws SAXParseException
Handles the start of an element within a target. Task containers
will always use another task handler, and all other tasks
will always use a nested element handler.
- onStartChild in interface ProjectHelper2.AntHandler
uri
- The namespace URI for this element.tag
- The name of the element being started.
Will not be null
.qname
- The qualified name for this element.attrs
- Attributes of the element being started.
Will not be null
.context
- The current context.
- The handler for elements.
onStartElement
public void onStartElement(String uri,
String tag,
String qname,
Attributes attrs,
AntXMLContext context)
throws SAXParseException
Initialisation routine called after handler creation
with the element name and attributes. This configures
the element with its attributes and sets it up with
its parent container (if any). Nested elements are then
added later as the parser encounters them.
- onStartElement in interface ProjectHelper2.AntHandler
uri
- The namespace URI for this element.tag
- Name of the element which caused this handler
to be created. Must not be null
.qname
- The qualified name for this element.attrs
- Attributes of the element which caused this
handler to be created. Must not be null
.context
- The current context.
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.