Package org.apache.tools.ant
Class ProjectHelperRepository
java.lang.Object
org.apache.tools.ant.ProjectHelperRepository
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
Modifier and TypeMethodDescriptionGet an iterator on the list of project helpers configured.static ProjectHelperRepositorygetProjectHelperForAntlib(Resource antlib) Get the helper that will be able to parse the specified antlib.getProjectHelperForBuildFile(Resource buildFile) Get the helper that will be able to parse the specified build file.voidregisterProjectHelper(Class<? extends ProjectHelper> helperClass) Register the specified project helper into the repository.voidregisterProjectHelper(String helperClassName) Register the specified project helper into the repository.
-
Method Details
-
getInstance
-
registerProjectHelper
Register the specified project helper into the repository.The helper will be added after all the already registered helpers, but before the default one (ProjectHelper2)
- Parameters:
helperClassName- the fully qualified name of the helper- Throws:
BuildException- if the class cannot be loaded or if there is no constructor with no argument- Since:
- Ant 1.8.2
-
registerProjectHelper
Register the specified project helper into the repository.The helper will be added after all the already registered helpers, but before the default one (ProjectHelper2)
- Parameters:
helperClass- the class of the helper- Throws:
BuildException- if there is no constructor with no argument- Since:
- Ant 1.8.2
-
getProjectHelperForBuildFile
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- Parameters:
buildFile- Resource- Returns:
- the first ProjectHelper that fit the requirement (never
null). - Throws:
BuildException
-
getProjectHelperForAntlib
Get the helper that will be able to parse the specified antlib. The helper will be chosen among the ones found in the classpath- Parameters:
antlib- Resource- Returns:
- the first ProjectHelper that fit the requirement (never
null). - Throws:
BuildException
-
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
-