public class AntXMLContext extends Object
Constructor and Description |
---|
AntXMLContext(Project project)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addTarget(Target target)
add a new target
|
void |
configureId(Object element,
org.xml.sax.Attributes attr)
Scans an attribute list for the
id attribute and
stores a reference to the target object in the project if an
id is found. |
RuntimeConfigurable |
currentWrapper()
get the current runtime configurable wrapper
can return null
|
void |
endPrefixMapping(String prefix)
End of prefix to uri mapping.
|
File |
getBuildFile()
find out the build file
|
File |
getBuildFileParent()
find out the parent build file of this build file
|
URL |
getBuildFileParentURL()
find out the parent build file of this build file
|
URL |
getBuildFileURL()
find out the build file
|
String |
getCurrentProjectName()
find out the current project name
|
Target |
getCurrentTarget()
get the current target
|
Map<String,Target> |
getCurrentTargets()
Get the targets in the current source file.
|
Target |
getImplicitTarget()
get the implicit target
|
org.xml.sax.Locator |
getLocator()
access the locator
|
String |
getPrefixMapping(String prefix)
prefix to namespace uri mapping
|
Project |
getProject()
find out the project to which this antxml context belongs
|
Vector<Target> |
getTargets()
access the vector of targets
|
Vector<RuntimeConfigurable> |
getWrapperStack()
access the stack of wrappers
|
boolean |
isIgnoringProjectTag()
tells whether the project tag is being ignored
|
RuntimeConfigurable |
parentWrapper()
get the runtime configurable wrapper of the parent project
can return null
|
void |
popWrapper()
remove a runtime configurable wrapper from the stack
|
void |
pushWrapper(RuntimeConfigurable wrapper)
add a runtime configurable wrapper to the internal stack
|
void |
setBuildFile(File buildFile)
sets the build file to which the XML context belongs
|
void |
setBuildFile(URL buildFile)
sets the build file to which the XML context belongs
|
void |
setCurrentProjectName(String name)
set the name of the current project
|
void |
setCurrentTarget(Target target)
sets the current target
|
void |
setCurrentTargets(Map<String,Target> currentTargets)
Set the map of the targets in the current source file.
|
void |
setIgnoreProjectTag(boolean flag)
sets the flag to ignore the project tag
|
void |
setImplicitTarget(Target target)
sets the implicit target
|
void |
setLocator(org.xml.sax.Locator locator)
sets the locator
|
void |
startPrefixMapping(String prefix,
String uri)
Called during parsing, stores the prefix to uri mapping.
|
public AntXMLContext(Project project)
project
- the project to which this antxml context belongs topublic void addTarget(Target target)
target
- target to addpublic void configureId(Object element, org.xml.sax.Attributes attr)
id
attribute 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.
element
- the current elementattr
- attributes of the current elementpublic RuntimeConfigurable currentWrapper()
public void endPrefixMapping(String prefix)
prefix
- the namespace prefixpublic File getBuildFile()
public File getBuildFileParent()
public URL getBuildFileParentURL()
public URL getBuildFileURL()
public String getCurrentProjectName()
public Target getCurrentTarget()
public Map<String,Target> getCurrentTargets()
public Target getImplicitTarget()
public org.xml.sax.Locator getLocator()
public String getPrefixMapping(String prefix)
prefix
- the prefix to mappublic Project getProject()
public Vector<Target> getTargets()
public Vector<RuntimeConfigurable> getWrapperStack()
public boolean isIgnoringProjectTag()
public RuntimeConfigurable parentWrapper()
public void popWrapper()
public void pushWrapper(RuntimeConfigurable wrapper)
wrapper
- runtime configurable wrapperpublic void setBuildFile(File buildFile)
buildFile
- ant build filepublic void setBuildFile(URL buildFile) throws MalformedURLException
buildFile
- ant build fileMalformedURLException
public void setCurrentProjectName(String name)
name
- name of the current projectpublic void setCurrentTarget(Target target)
target
- current targetpublic void setCurrentTargets(Map<String,Target> currentTargets)
currentTargets
- a map of targets.public void setIgnoreProjectTag(boolean flag)
flag
- to ignore the project tagpublic void setImplicitTarget(Target target)
target
- the implicit targetpublic void setLocator(org.xml.sax.Locator locator)
locator
- locator