Package org.apache.tools.ant.helper
Class AntXMLContext
java.lang.Object
org.apache.tools.ant.helper.AntXMLContext
Context information for the ant processing.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd a new targetvoidconfigureId(Object element, Attributes attr) Scans an attribute list for theidattribute and stores a reference to the target object in the project if an id is found.get the current runtime configurable wrapper can return nullvoidendPrefixMapping(String prefix) End of prefix to uri mapping.find out the build filefind out the parent build file of this build filefind out the parent build file of this build filefind out the build filefind out the current project nameget the current targetGet the targets in the current source file.get the implicit targetaccess the locatorgetPrefixMapping(String prefix) prefix to namespace uri mappingfind out the project to which this antxml context belongsaccess the vector of targetsaccess the stack of wrappersbooleantells whether the project tag is being ignoredget the runtime configurable wrapper of the parent project can return nullvoidremove a runtime configurable wrapper from the stackvoidpushWrapper(RuntimeConfigurable wrapper) add a runtime configurable wrapper to the internal stackvoidsetBuildFile(File buildFile) sets the build file to which the XML context belongsvoidsetBuildFile(URL buildFile) sets the build file to which the XML context belongsvoidsetCurrentProjectName(String name) set the name of the current projectvoidsetCurrentTarget(Target target) sets the current targetvoidsetCurrentTargets(Map<String, Target> currentTargets) Set the map of the targets in the current source file.voidsetIgnoreProjectTag(boolean flag) sets the flag to ignore the project tagvoidsetImplicitTarget(Target target) sets the implicit targetvoidsetLocator(Locator locator) sets the locatorvoidstartPrefixMapping(String prefix, String uri) Called during parsing, stores the prefix to uri mapping.
- 
Constructor Details- 
AntXMLContextconstructor- Parameters:
- project- the project to which this antxml context belongs to
 
 
- 
- 
Method Details- 
setBuildFilesets the build file to which the XML context belongs- Parameters:
- buildFile- ant build file
 
- 
setBuildFilesets the build file to which the XML context belongs- Parameters:
- buildFile- Ant build file
- Throws:
- MalformedURLException- if parent URL cannot be constructed
- Since:
- Ant 1.8.0
 
- 
getBuildFilefind out the build file- Returns:
- the build file to which the XML context belongs
 
- 
getBuildFileParentfind out the parent build file of this build file- Returns:
- the parent build file of this build file
 
- 
getBuildFileURLfind out the build file- Returns:
- the build file to which the xml context belongs
- Since:
- Ant 1.8.0
 
- 
getBuildFileParentURLfind out the parent build file of this build file- Returns:
- the parent build file of this build file
- Since:
- Ant 1.8.0
 
- 
getProjectfind out the project to which this antxml context belongs- Returns:
- project
 
- 
getCurrentProjectNamefind out the current project name- Returns:
- current project name
 
- 
setCurrentProjectNameset the name of the current project- Parameters:
- name- name of the current project
 
- 
currentWrapperget the current runtime configurable wrapper can return null- Returns:
- runtime configurable wrapper
 
- 
parentWrapperget the runtime configurable wrapper of the parent project can return null- Returns:
- runtime configurable wrapper of the parent project
 
- 
pushWrapperadd a runtime configurable wrapper to the internal stack- Parameters:
- wrapper- runtime configurable wrapper
 
- 
popWrapperpublic void popWrapper()remove a runtime configurable wrapper from the stack
- 
getWrapperStackaccess the stack of wrappers- Returns:
- the stack of wrappers
 
- 
addTargetadd a new target- Parameters:
- target- target to add
 
- 
getCurrentTargetget the current target- Returns:
- current target
 
- 
getImplicitTargetget the implicit target- Returns:
- implicit target
 
- 
setCurrentTargetsets the current target- Parameters:
- target- current target
 
- 
setImplicitTargetsets the implicit target- Parameters:
- target- the implicit target
 
- 
getTargetsaccess the vector of targets- Returns:
- vector of targets
 
- 
configureIdScans an attribute list for theidattribute and stores a reference to the target object in the project if an id is found.This method was moved out of the configure method to allow it to be executed at parse time. - Parameters:
- element- the current element
- attr- attributes of the current element
 
- 
getLocatoraccess the locator- Returns:
- locator
 
- 
setLocatorsets the locator- Parameters:
- locator- locator
 
- 
isIgnoringProjectTagpublic boolean isIgnoringProjectTag()tells whether the project tag is being ignored- Returns:
- whether the project tag is being ignored
 
- 
setIgnoreProjectTagpublic void setIgnoreProjectTag(boolean flag) sets the flag to ignore the project tag- Parameters:
- flag- to ignore the project tag
 
- 
startPrefixMappingCalled during parsing, stores the prefix to uri mapping.- Parameters:
- prefix- a namespace prefix
- uri- a namespace uri
 
- 
endPrefixMappingEnd of prefix to uri mapping.- Parameters:
- prefix- the namespace prefix
 
- 
getPrefixMappingprefix to namespace uri mapping- Parameters:
- prefix- the prefix to map
- Returns:
- the uri for this prefix, null if not present
 
- 
getCurrentTargetsGet the targets in the current source file.- Returns:
- the current targets.
 
- 
setCurrentTargetsSet the map of the targets in the current source file.- Parameters:
- currentTargets- a map of targets.
 
 
-