Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class Antlib

extends Task
implements TaskContainer
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.TaskContainer
Imports
java.io.IOException, java.net.URL, .URLConnection, java.util.ArrayList, .List, org.apache.tools.ant.BuildException, .ComponentHelper, .MagicNames, .Project, .ProjectHelper, .ProjectHelperRepository, .Task, .TaskContainer, .UnknownElement, org.apache.tools.ant.types.resources.URLResource

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

Modifier and TypeField and Description
private ClassLoader
public static final String
TAG

The name of this task

private List<Task>
private String
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addTask(Task
Nested task to execute in antlib
nestedTask
)

Implements org.apache.tools.ant.TaskContainer.addTask.

add a task to the list of tasks
public static Antlib

Returns:

the ant lib task
createAntlib
(Project
the current project
project
,
URL
the url to read the definitions from
antlibUrl
,
String
the uri that the antlib is to be placed in
uri
)

Static method to read an ant lib definition from a url.

public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Execute the nested tasks, setting the classloader for any tasks that derive from Definer.
private ClassLoader
protected void
setClassLoader(ClassLoader
the class loader
classLoader
)

Set the class loader for this antlib.

protected void
setURI(String
the namespace uri
uri
)

Set the URI for this antlib.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

classLoaderback to summary
private ClassLoader classLoader
TAGback to summary
public static final String TAG

The name of this task

tasksback to summary
private List<Task> tasks
uriback to summary
private String uri

Constructor Detail

Antlibback to summary
public Antlib()

Method Detail

addTaskback to summary
public void addTask(Task nestedTask)

Implements org.apache.tools.ant.TaskContainer.addTask.

add a task to the list of tasks

Parameters
nestedTask:Task

Nested task to execute in antlib

Annotations
@Override
createAntlibback to summary
public static Antlib createAntlib(Project project, URL antlibUrl, String uri)

Static method to read an ant lib definition from a url.

Parameters
project:Project

the current project

antlibUrl:URL

the url to read the definitions from

uri:String

the uri that the antlib is to be placed in

Returns:Antlib

the ant lib task

executeback to summary
public void execute()

Overrides org.apache.tools.ant.Task.execute.

Execute the nested tasks, setting the classloader for any tasks that derive from Definer.

Annotations
@Override
getClassLoaderback to summary
private ClassLoader getClassLoader()
setClassLoaderback to summary
protected void setClassLoader(ClassLoader classLoader)

Set the class loader for this antlib. This class loader is used for any tasks that derive from Definer.

Parameters
classLoader:ClassLoader

the class loader

setURIback to summary
protected void setURI(String uri)

Set the URI for this antlib.

Parameters
uri:String

the namespace uri