org.apache.tools.ant.helperClass ProjectHelper2.TargetHandler
- java.lang.Object
- org.apache.tools.ant.helper.ProjectHelper2.AntHandler
- org.apache.tools.ant.helper.ProjectHelper2.TargetHandler
- Enclosing class:
- ProjectHelper2
public static class ProjectHelper2.TargetHandler extends ProjectHelper2.AntHandlerHandler for "target" and "extension-point" elements.
Constructor Summary
Constructors Constructor and Description TargetHandler()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
onEndElement(java.lang.String uri, java.lang.String tag, AntXMLContext context)
Handle the end of the project, sets the current target of the context to be the implicit target.ProjectHelper2.AntHandler
onStartChild(java.lang.String uri, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attrs, AntXMLContext context)
Handles the start of an element within a target.void
onStartElement(java.lang.String uri, java.lang.String tag, java.lang.String qname, org.xml.sax.Attributes attrs, AntXMLContext context)
Initialisation routine called after handler creation with the element name and attributes.
Methods inherited from class org.apache.tools.ant.helper.ProjectHelper2.AntHandler
characters, checkNamespace, onEndChild
Method Detail
onStartElement
public void onStartElement(java.lang.String uri, java.lang.String tag, java.lang.String qname, org.xml.sax.Attributes attrs, AntXMLContext context) throws org.xml.sax.SAXParseExceptionInitialisation routine called after handler creation with the element name and attributes. The attributes which this handler can deal with are:"name"
,"depends"
,"if"
,"unless"
,"id"
and"description"
.
- Overrides:
onStartElement
in classProjectHelper2.AntHandler
- Parameters:
uri
- The namespace URI for this element.tag
- Name of the element which caused this handler to be created. Should not benull
. Ignored in this implementation.qname
- The qualified name for this element.attrs
- Attributes of the element which caused this handler to be created. Must not benull
.context
- The current context.- Throws:
org.xml.sax.SAXParseException
- if an unexpected attribute is encountered or if the"name"
attribute is missing.
onStartChild
public ProjectHelper2.AntHandler onStartChild(java.lang.String uri, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attrs, AntXMLContext context) throws org.xml.sax.SAXParseExceptionHandles the start of an element within a target.
- Overrides:
onStartChild
in classProjectHelper2.AntHandler
- Parameters:
uri
- The namespace URI for this element.name
- The name of the element being started. Will not benull
.qname
- The qualified name for this element.attrs
- Attributes of the element being started. Will not benull
.context
- The current context.- Returns:
- an element handler.
- Throws:
org.xml.sax.SAXParseException
- if an error occurs when initialising the appropriate child handler
onEndElement
public void onEndElement(java.lang.String uri, java.lang.String tag, AntXMLContext context)Handle the end of the project, sets the current target of the context to be the implicit target.
- Overrides:
onEndElement
in classProjectHelper2.AntHandler
- Parameters:
uri
- The namespace URI of the element.tag
- The name of the element.context
- The current context.