Class 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.
    Ant 1.6
    • Constructor Detail

      • Antlib

        public Antlib()
    • Method Detail

      • createAntlib

        public static Antlib createAntlib​(Project project,
                                          java.lang.String uri)
        Static method to read an ant lib definition from a url.
        project - the current project
        antlibUrl - the url to read the definitions from
        uri - the uri that the antlib is to be placed in
        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.
        classLoader - the class loader
      • setURI

        protected void setURI​(java.lang.String uri)
        Set the URI for this antlib.
        uri - the namespace uri
      • addTask

        public void addTask​(Task nestedTask)
        add a task to the list of tasks
        Specified by:
        addTask in interface TaskContainer
        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.
        execute in class Task