Top Description Inners Fields Constructors Methods
org.apache.tools.ant.helper

public Class ProjectHelper2

extends ProjectHelper
Class Inheritance
Imports
java.io.File, .FileNotFoundException, .IOException, .InputStream, .UnsupportedEncodingException, java.net.MalformedURLException, .URL, .URLConnection, java.nio.file.Files, java.util.HashMap, .Hashtable, .Map, .Stack, org.apache.tools.ant.BuildException, .ExtensionPoint, .Location, .MagicNames, .Project, .ProjectHelper, .RuntimeConfigurable, .Target, .Task, .UnknownElement, org.apache.tools.ant.types.Resource, org.apache.tools.ant.types.resources.FileProvider, .URLProvider, org.apache.tools.ant.util.FileUtils, .JAXPUtils, org.apache.tools.zip.ZipFile, org.xml.sax.Attributes, .InputSource, .Locator, .SAXException, .SAXParseException, .XMLReader, org.xml.sax.helpers.DefaultHandler

Sax2 based project reader

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ProjectHelper2.AntHandler

The common superclass for all SAX event handlers used to parse the configuration file.

public static class
ProjectHelper2.ElementHandler

Handler for all project elements (tasks, data types)

public static class
ProjectHelper2.MainHandler

The main handler - it handles the <project> tag.

public static class
ProjectHelper2.ProjectHandler

Handler for the top level "project" element.

public static class
ProjectHelper2.RootHandler

Handler for ant processing.

public static class
ProjectHelper2.TargetHandler

Handler for "target" and "extension-point" elements.

Field Summary

Modifier and TypeField and Description
private static ProjectHelper2.AntHandler
private static final FileUtils
FILE_UTILS

helper for path -> URI and URI -> path conversions.

private static ProjectHelper2.AntHandler
private static ProjectHelper2.AntHandler
private static final String
REFID_CONTEXT

Specific to ProjectHelper2 so not a true Ant "magic name:"

public static final String
REFID_TARGETS

Reference holding the (ordered) target Vector

private static ProjectHelper2.AntHandler
Inherited from org.apache.tools.ant.ProjectHelper:
ANT_ATTRIBUTE_URIANT_CORE_URIANT_CURRENT_URIANT_TYPEANTLIB_URIHELPER_PROPERTYPROJECTHELPER_REFERENCESERVICE_IDUSE_PROJECT_NAME_AS_TARGET_PREFIX

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
canParseAntlibDescriptor(Resource
Resource
resource
)

Overrides org.apache.tools.ant.ProjectHelper.canParseAntlibDescriptor.

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.AntHandler

Returns:

element handler
getElementHandler
()

Returns element handler

protected static ProjectHelper2.AntHandler

Returns:

main handler
getMainHandler
()

Returns main handler

protected static ProjectHelper2.AntHandler

Returns:

project handler
getProjectHandler
()

Returns project handler

protected static ProjectHelper2.AntHandler

Returns:

target handler
getTargetHandler
()

Returns target handler

public void
parse(Project
the current project
project
,
Object
the xml source
source
)

Overrides org.apache.tools.ant.ProjectHelper.parse.

Parse a source xml input.
public void
parse(Project
the current project
project
,
Object
the xml source
source
,
ProjectHelper2.RootHandler
the root handler to use (contains the current context)
handler
)

Parses the project file, configuring the project as it goes.

public UnknownElement
parseAntlibDescriptor(Project
Project
containingProject
,
Resource
Resource
resource
)

Overrides org.apache.tools.ant.ProjectHelper.parseAntlibDescriptor.

Parse the given URL as an antlib descriptor and return the content as something that can be turned into an Antlib task.
public UnknownElement

Returns:

a configured task
parseUnknownElement
(Project
the current project
project
,
URL
the url containing the task
source
)

Parse an unknown element from a url

protected static void
setElementHandler(ProjectHelper2.AntHandler
new element handler
handler
)

Sets element handler

protected static void
setMainHandler(ProjectHelper2.AntHandler
new main handler
handler
)

Sets main handler

protected static void
setProjectHandler(ProjectHelper2.AntHandler
new project handler
handler
)

Sets project handler

protected static void
setTargetHandler(ProjectHelper2.AntHandler
new target handler
handler
)

Sets target handler

Inherited from org.apache.tools.ant.ProjectHelper:
addLocationToBuildExceptionaddTextaddTextcanParseBuildFileconfigureconfigureProjectextractNameFromComponentNameextractUriFromComponentNamegenComponentNamegetContextClassLoadergetCurrentPrefixSeparatorgetCurrentTargetPrefixgetDefaultBuildFilegetExtensionStackgetImportStackgetProjectHelperisInIncludeModensToComponentNameparsePropertyStringreplacePropertiesreplacePropertiesresolveExtensionOfAttributessetCurrentPrefixSeparatorsetCurrentTargetPrefixsetInIncludeModestoreChild