ProjectHelperImpl (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.helper, class: ProjectHelperImpl

# Class ProjectHelperImpl

java.lang.Object
org.apache.tools.ant.ProjectHelper
org.apache.tools.ant.helper.ProjectHelperImpl

public class ProjectHelperImpl extends ProjectHelper
Original helper.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class ProjectHelper

  `ProjectHelper.OnMissingExtensionPoint`
  Modifier and Type
  Class
  Description
  `static final class`
  `ProjectHelper.OnMissingExtensionPoint`
  Possible value for target's onMissingExtensionPoint attribute.

- ## Field Summary

  ### Fields inherited from class ProjectHelper

  `ANT_ATTRIBUTE_URI, ANT_CORE_URI, ANT_CURRENT_URI, ANT_TYPE, ANTLIB_URI, HELPER_PROPERTY, PROJECTHELPER_REFERENCE, SERVICE_ID, USE_PROJECT_NAME_AS_TARGET_PREFIX`
  Modifier and Type
  Field
  Description
  `static final String`
  `ANT_ATTRIBUTE_URI`
  The URI for ant specific attributes
  `static final String`
  `ANT_CORE_URI`
  The URI for ant name space
  `static final String`
  `ANT_CURRENT_URI`
  The URI for antlib current definitions
  `static final String`
  `ANT_TYPE`
  Polymorphic attribute
  `static final String`
  `ANTLIB_URI`
  Deprecated.
  use MagicNames.ANTLIB_PREFIX
  `static final String`
  `HELPER_PROPERTY`
  Deprecated.
  use MagicNames.PROJECT_HELPER_CLASS
  `static final String`
  `PROJECTHELPER_REFERENCE`
  Deprecated.
  use MagicNames.REFID_PROJECT_HELPER
  `static final String`
  `SERVICE_ID`
  Deprecated.
  use MagicNames.PROJECT_HELPER_SERVICE
  `static final String`
  `USE_PROJECT_NAME_AS_TARGET_PREFIX`
  constant to denote use project name as target prefix

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProjectHelperImpl()`
  default constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `parse(Project project, Object source)`
  Parses the project file, configuring the project as it goes.

  ### Methods inherited from class ProjectHelper

  `addLocationToBuildException, addText, addText, canParseAntlibDescriptor, canParseBuildFile, configure, configureProject, extractNameFromComponentName, extractUriFromComponentName, genComponentName, getContextClassLoader, getCurrentPrefixSeparator, getCurrentTargetPrefix, getDefaultBuildFile, getExtensionStack, getImportStack, getProjectHelper, isInIncludeMode, nsToComponentName, parseAntlibDescriptor, parsePropertyString, replaceProperties, replaceProperties, resolveExtensionOfAttributes, setCurrentPrefixSeparator, setCurrentTargetPrefix, setInIncludeMode, storeChild`
  Modifier and Type
  Method
  Description
  `static BuildException`
  `addLocationToBuildException(BuildException ex, Location newLocation)`
  Add location to build exception.
  `static void`
  `addText(Project project, Object target, char[] buf, int start, int count)`
  Adds the content of #PCDATA sections to an element.
  `static void`
  `addText(Project project, Object target, String text)`
  Adds the content of #PCDATA sections to an element.
  `boolean`
  `canParseAntlibDescriptor(Resource r)`
  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.
  `boolean`
  `canParseBuildFile(Resource buildFile)`
  Check if the helper supports the kind of file.
  `static void`
  `configure(Object target, AttributeList attrs, Project project)`
  Deprecated.
  since 1.6.x.
  `static void`
  `configureProject(Project project, File buildFile)`
  Configures the project with the contents of the specified build file.
  `static String`
  `extractNameFromComponentName(String componentName)`
  extract the element name from a component name
  `static String`
  `extractUriFromComponentName(String componentName)`
  extract a uri from a component name
  `static String`
  `genComponentName(String uri, String name)`
  Map a namespaced {uri,name} to an internal string format.
  `static ClassLoader`
  `getContextClassLoader()`
  Deprecated.
  since 1.6.x.
  `static String`
  `getCurrentPrefixSeparator()`
  The separator between the prefix and the target name.
  `static String`
  `getCurrentTargetPrefix()`
  The prefix to prepend to imported target names.
  `String`
  `getDefaultBuildFile()`
  The file name of the build script to be parsed if none specified on the command line
  `List<String[]>`
  `getExtensionStack()`
  Extension stack.
  `Vector<Object>`
  `getImportStack()`
  Import stack.
  `static ProjectHelper`
  `getProjectHelper()`
  Get the first project helper found in the classpath
  `static boolean`
  `isInIncludeMode()`
  Whether the current file should be read in include as opposed to import mode.
  `static String`
  `nsToComponentName(String ns)`
  Convert an attribute namespace to a "component name".
  `UnknownElement`
  `parseAntlibDescriptor(Project containingProject, Resource source)`
  Parse the given URL as an antlib descriptor and return the content as something that can be turned into an Antlib task.
  `static void`
  `parsePropertyString(String value, Vector<String> fragments, Vector<String> propertyRefs)`
  Deprecated.
  since 1.6.x.
  `static String`
  `replaceProperties(Project project, String value)`
  Deprecated.
  since 1.6.x.
  `static String`
  `replaceProperties(Project project, String value, Hashtable<String,Object> keys)`
  Deprecated.
  since 1.6.x.
  `void`
  `resolveExtensionOfAttributes(Project project)`
  Check extensionStack and inject all targets having extensionOf attributes into extensionPoint.
  `static void`
  `setCurrentPrefixSeparator(String sep)`
  Sets the separator between the prefix and the target name.
  `static void`
  `setCurrentTargetPrefix(String prefix)`
  Sets the prefix to prepend to imported target names.
  `static void`
  `setInIncludeMode(boolean includeMode)`
  Sets whether the current file should be read in include as opposed to import mode.
  `static void`
  `storeChild(Project project, Object parent, Object child, String tag)`
  Stores a configured child element within its parent object.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ProjectHelperImpl

    public ProjectHelperImpl()
    default constructor

- ## Method Details

  - ### parse

    public void parse(Project project, Object source) throws BuildException
    Parses the project file, configuring the project as it goes.
    Overrides:
      `parse` in class `ProjectHelper`
    Parameters:
      `project` - project instance to be configured.
      `source` - the source from which the project is read.
    Throws:
      `BuildException` - if the configuration is invalid or cannot be read.