org.apache.tools.ant.helper

Class ProjectHelper2


public class ProjectHelper2
extends ProjectHelper

Sax2 based project reader

Nested Class Summary

static class
ProjectHelper2.AntHandler
The common superclass for all SAX event handlers used to parse the configuration file.
static class
ProjectHelper2.ElementHandler
Handler for all project elements ( tasks, data types )
static class
ProjectHelper2.MainHandler
The main handler - it handles the <project> tag.
static class
ProjectHelper2.ProjectHandler
Handler for the top level "project" element.
static class
ProjectHelper2.RootHandler
Handler for ant processing.
static class
ProjectHelper2.TargetHandler
Handler for "target" elements.

Field Summary

Fields inherited from class org.apache.tools.ant.ProjectHelper

ANTLIB_URI, ANT_CORE_URI, ANT_CURRENT_URI, ANT_TYPE, HELPER_PROPERTY, SERVICE_ID

Method Summary

void
parse(Project project, Object source)
Parse a source xml input.
void
parse(Project project, Object source, ProjectHelper2.RootHandler handler)
Parses the project file, configuring the project as it goes.
UnknownElement
parseUnknownElement(Project project, URL source)
Parse an unknown element from a url

Methods inherited from class org.apache.tools.ant.ProjectHelper

addLocationToBuildException, addText, addText, configure, configureProject, extractNameFromComponentName, extractUriFromComponentName, genComponentName, getContextClassLoader, getImportStack, getProjectHelper, parse, parsePropertyString, replaceProperties, replaceProperties, storeChild

Method Details

parse

public void parse(Project project,
                  Object source)
            throws BuildException
Parse a source xml input.
Overrides:
parse in interface ProjectHelper
Parameters:
project - the current project
source - the xml source
Throws:
BuildException - if an error occurs

parse

public void parse(Project project,
                  Object source,
                  ProjectHelper2.RootHandler handler)
            throws BuildException
Parses the project file, configuring the project as it goes.
Parameters:
project - the current project
source - the xml source
handler - the root handler to use (contains the current context)
Throws:
BuildException - if the configuration is invalid or cannot be read

parseUnknownElement

public UnknownElement parseUnknownElement(Project project,
                                          URL source)
            throws BuildException
Parse an unknown element from a url
Parameters:
project - the current project
source - the url containing the task
Returns:
a configured task
Throws:
BuildException - if an error occurs

Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.