Package org.apache.tools.ant.helper
Class ProjectHelper2
java.lang.Object
org.apache.tools.ant.ProjectHelper
org.apache.tools.ant.helper.ProjectHelper2
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classThe common superclass for all SAX event handlers used to parse the configuration file.static classHandler for all project elements (tasks, data types)static classThe main handler - it handles the <project> tag.static classHandler for the top level "project" element.static classHandler for ant processing.static classHandler for "target" and "extension-point" elements.Nested classes/interfaces inherited from class org.apache.tools.ant.ProjectHelperProjectHelper.OnMissingExtensionPoint
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringReference holding the (ordered) target VectorFields inherited from class org.apache.tools.ant.ProjectHelperANT_ATTRIBUTE_URI, ANT_CORE_URI, ANT_CURRENT_URI, ANT_TYPE, ANTLIB_URI, HELPER_PROPERTY, PROJECTHELPER_REFERENCE, SERVICE_ID, USE_PROJECT_NAME_AS_TARGET_PREFIX
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanParseAntlibDescriptor(Resource resource) Whether this instance of ProjectHelper can parse an Antlib descriptor given by the URL and return its content as an UnknownElement ready to be turned into an Antlib task.protected static ProjectHelper2.AntHandlerReturns element handlerprotected static ProjectHelper2.AntHandlerReturns main handlerprotected static ProjectHelper2.AntHandlerReturns project handlerprotected static ProjectHelper2.AntHandlerReturns target handlervoidParse a source xml input.voidparse(Project project, Object source, ProjectHelper2.RootHandler handler) Parses the project file, configuring the project as it goes.parseAntlibDescriptor(Project containingProject, Resource resource) Parse the given URL as an antlib descriptor and return the content as something that can be turned into an Antlib task.parseUnknownElement(Project project, URL source) Parse an unknown element from a urlprotected static voidSets element handlerprotected static voidsetMainHandler(ProjectHelper2.AntHandler handler) Sets main handlerprotected static voidSets project handlerprotected static voidSets target handlerMethods inherited from class org.apache.tools.ant.ProjectHelperaddLocationToBuildException, addText, addText, canParseBuildFile, configure, configureProject, extractNameFromComponentName, extractUriFromComponentName, genComponentName, getContextClassLoader, getCurrentPrefixSeparator, getCurrentTargetPrefix, getDefaultBuildFile, getExtensionStack, getImportStack, getProjectHelper, isInIncludeMode, nsToComponentName, parsePropertyString, replaceProperties, replaceProperties, resolveExtensionOfAttributes, setCurrentPrefixSeparator, setCurrentTargetPrefix, setInIncludeMode, storeChild
- 
Field Details- 
REFID_TARGETS
 
- 
- 
Constructor Details- 
ProjectHelper2public ProjectHelper2()
 
- 
- 
Method Details- 
canParseAntlibDescriptorWhether this instance of ProjectHelper can parse an Antlib descriptor given by the URL and return its content as an UnknownElement ready to be turned into an Antlib task.This implementation returns true. - Overrides:
- canParseAntlibDescriptorin class- ProjectHelper
- Parameters:
- resource- Resource
- Returns:
- boolean
- Since:
- Ant 1.8.0
 
- 
parseAntlibDescriptorParse the given URL as an antlib descriptor and return the content as something that can be turned into an Antlib task.simply delegates to parseUnknownElementif the resource provides an URL and throws an exception otherwise.- Overrides:
- parseAntlibDescriptorin class- ProjectHelper
- Parameters:
- containingProject- Project
- resource- Resource
- Returns:
- UnknownElement
- Since:
- Ant 1.8.0
 
- 
parseUnknownElementParse 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
 
- 
parseParse a source xml input.- Overrides:
- parsein class- ProjectHelper
- Parameters:
- project- the current project
- source- the xml source
- Throws:
- BuildException- if an error occurs
 
- 
parsepublic 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
 
- 
getMainHandlerReturns main handler- Returns:
- main handler
 
- 
setMainHandlerSets main handler- Parameters:
- handler- new main handler
 
- 
getProjectHandlerReturns project handler- Returns:
- project handler
 
- 
setProjectHandlerSets project handler- Parameters:
- handler- new project handler
 
- 
getTargetHandlerReturns target handler- Returns:
- target handler
 
- 
setTargetHandlerSets target handler- Parameters:
- handler- new target handler
 
- 
getElementHandlerReturns element handler- Returns:
- element handler
 
- 
setElementHandlerSets element handler- Parameters:
- handler- new element handler
 
 
-