org.apache.tools.ant
Class ProjectHelperRepository

java.lang.Object
  extended by org.apache.tools.ant.ProjectHelperRepository

public class ProjectHelperRepository
extends java.lang.Object

Repository of ProjectHelper found in the classpath or via some System properties.

See the ProjectHelper documentation in the manual.

Since:
Ant 1.8.0

Method Summary
 java.util.Iterator getHelpers()
          Get an iterator on the list of project helpers configured.
static ProjectHelperRepository getInstance()
           
 ProjectHelper getProjectHelperForAntlib(Resource antlib)
          Get the helper that will be able to parse the specified antlib.
 ProjectHelper getProjectHelperForBuildFile(Resource buildFile)
          Get the helper that will be able to parse the specified build file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ProjectHelperRepository getInstance()

getProjectHelperForBuildFile

public ProjectHelper getProjectHelperForBuildFile(Resource buildFile)
                                           throws BuildException
Get the helper that will be able to parse the specified build file. The helper will be chosen among the ones found in the classpath

Returns:
the first ProjectHelper that fit the requirement (never null).
Throws:
BuildException

getProjectHelperForAntlib

public ProjectHelper getProjectHelperForAntlib(Resource antlib)
                                        throws BuildException
Get the helper that will be able to parse the specified antlib. The helper will be chosen among the ones found in the classpath

Returns:
the first ProjectHelper that fit the requirement (never null).
Throws:
BuildException

getHelpers

public java.util.Iterator getHelpers()
Get an iterator on the list of project helpers configured. The iterator will always return at least one element as there will always be the default project helper configured.

Returns:
an iterator of ProjectHelper