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

public Class AntlibDefinition

extends Task
Class Inheritance
Known Direct Subclasses
org.apache.tools.ant.taskdefs.AttributeNamespaceDef, org.apache.tools.ant.taskdefs.DefBase, org.apache.tools.ant.taskdefs.MacroDef, org.apache.tools.ant.taskdefs.PreSetDef
Imports
org.apache.tools.ant.BuildException, .ProjectHelper, .Task

Base class for tasks that that can be used in antlibs. For handling uri and class loading.
Since
Ant 1.6

Field Summary

Modifier and TypeField and Description
private ClassLoader
private String
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClassLoader

Returns:

the antlib classloader for the definition, this is null if the definition is not used in an antlib.
getAntlibClassLoader
()

The current antlib classloader

public String

Returns:

The URI for this definition.
getURI
()

The URI for this definition.

public void
setAntlibClassLoader(ClassLoader
a ClassLoader value
classLoader
)

Set the class loader of the loading object

public void
setURI(String
the namespace URI
uri
)

The URI for this definition.

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

Field Detail

antlibClassLoaderback to summary
private ClassLoader antlibClassLoader
uriback to summary
private String uri

Constructor Detail

AntlibDefinitionback to summary
public AntlibDefinition()

Method Detail

getAntlibClassLoaderback to summary
public ClassLoader getAntlibClassLoader()

The current antlib classloader

Returns:ClassLoader

the antlib classloader for the definition, this is null if the definition is not used in an antlib.

getURIback to summary
public String getURI()

The URI for this definition.

Returns:String

The URI for this definition.

setAntlibClassLoaderback to summary
public void setAntlibClassLoader(ClassLoader classLoader)

Set the class loader of the loading object

Parameters
classLoader:ClassLoader

a ClassLoader value

setURIback to summary
public void setURI(String uri) throws BuildException

The URI for this definition. If the URI is "antlib:org.apache.tools.ant", (this is the default uri) the uri will be set to "". URIs that start with "ant:" are reserved and are not allowed in this context.

Parameters
uri:String

the namespace URI

Exceptions
BuildException:
if a reserved URI is used