org.apache.tools.ant.taskdefs

Class AntlibDefinition

Known Direct Subclasses:
DefBase, MacroDef, PreSetDef

public class AntlibDefinition
extends Task

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

Since:
Ant 1.6

Field Summary

Fields inherited from class org.apache.tools.ant.Task

description, location, target, taskName, taskType, wrapper

Fields inherited from class org.apache.tools.ant.ProjectComponent

project

Method Summary

ClassLoader
getAntlibClassLoader()
The current antlib classloader
String
getURI()
The URI for this definition.
void
setAntlibClassLoader(ClassLoader classLoader)
Set the class loader of the loading object
void
setURI(String uri)
The URI for this definition.

Methods inherited from class org.apache.tools.ant.Task

execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Method Details

getAntlibClassLoader

public ClassLoader getAntlibClassLoader()
The current antlib classloader

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


getURI

public String getURI()
The URI for this definition.

Returns:
The URI for this defintion.


setAntlibClassLoader

public void setAntlibClassLoader(ClassLoader classLoader)
Set the class loader of the loading object

Parameters:
classLoader - a ClassLoader value


setURI

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 - the namespace URI

Throws:
BuildException - if a reserved URI is used


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.