Package org.apache.tools.ant.taskdefs

# Class AntlibDefinition

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.AntlibDefinition

All Implemented Interfaces:
  `java.lang.Cloneable`

Direct Known Subclasses:
  `AttributeNamespaceDef`, `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

  `target, taskName, taskType, wrapper`

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

  `description, location, project`

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `AntlibDefinition()` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.lang.ClassLoader` | `getAntlibClassLoader()` | The current antlib classloader
  `java.lang.String` | `getURI()` | The URI for this definition.
  `void` | `setAntlibClassLoader​(java.lang.ClassLoader classLoader)` | Set the class loader of the loading object
  `void` | `setURI​(java.lang.String uri)` | The URI for this definition.

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

  `bindToOwner, execute, 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`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AntlibDefinition

    public AntlibDefinition()

- ## Method Details

  - ### setURI

    public void setURI​(java.lang.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

  - ### getURI

    public java.lang.String getURI()
    The URI for this definition.
    Returns:
      The URI for this definition.

  - ### setAntlibClassLoader

    public void setAntlibClassLoader​(java.lang.ClassLoader classLoader)
    Set the class loader of the loading object
    Parameters:
      `classLoader` - a `ClassLoader` value

  - ### getAntlibClassLoader

    public java.lang.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.