Package org.apache.tools.ant.taskdefs
Class Antlib
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.Antlib
- All Implemented Interfaces:
java.lang.Cloneable
,TaskContainer
public class Antlib extends Task implements TaskContainer
Antlib task. It does not
occur in an ant build file. It is the root element
an antlib xml file.
- Since:
- Ant 1.6
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TAG
The name of this task -
Constructor Summary
Constructors Constructor Description Antlib()
-
Method Summary
Modifier and Type Method Description void
addTask(Task nestedTask)
add a task to the list of tasksstatic Antlib
createAntlib(Project project, java.net.URL antlibUrl, java.lang.String uri)
Static method to read an ant lib definition from a url.void
execute()
Execute the nested tasks, setting the classloader for any tasks that derive from Definer.protected void
setClassLoader(java.lang.ClassLoader classLoader)
Set the class loader for this antlib.protected void
setURI(java.lang.String uri)
Set the URI for this antlib.Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
TAG
public static final java.lang.String TAGThe name of this task- See Also:
- Constant Field Values
-
-
Constructor Details
-
Antlib
public Antlib()
-
-
Method Details
-
createAntlib
Static method to read an ant lib definition from a url.- Parameters:
project
- the current projectantlibUrl
- the url to read the definitions fromuri
- the uri that the antlib is to be placed in- Returns:
- the ant lib task
-
setClassLoader
protected void setClassLoader(java.lang.ClassLoader classLoader)Set the class loader for this antlib. This class loader is used for any tasks that derive from Definer.- Parameters:
classLoader
- the class loader
-
setURI
protected void setURI(java.lang.String uri)Set the URI for this antlib.- Parameters:
uri
- the namespace uri
-
addTask
add a task to the list of tasks- Specified by:
addTask
in interfaceTaskContainer
- Parameters:
nestedTask
- Nested task to execute in antlib
-
execute
public void execute()Execute the nested tasks, setting the classloader for any tasks that derive from Definer.
-