org.apache.tools.ant.taskdefs
Class Taskdef

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.AntlibDefinition
                    |
                    +--org.apache.tools.ant.taskdefs.DefBase
                          |
                          +--org.apache.tools.ant.taskdefs.Definer
                                |
                                +--org.apache.tools.ant.taskdefs.Typedef
                                      |
                                      +--org.apache.tools.ant.taskdefs.Taskdef

public class Taskdef
extends Typedef

Adds a task definition to the current project, such that this new task can be used in the current project. Two attributes are needed, the name that identifies this task uniquely, and the full name of the class (including the packages) that implements this task.

You can also define a group of tasks at once using the file or resource attributes. These attributes point to files in the format of Java property files. Each line defines a single task in the format:

 taskname=fully.qualified.java.classname
 

Since:
Ant 1.1

Nested Class Summary
 
Nested classes inherited from class org.apache.tools.ant.taskdefs.Definer
Definer.Format, Definer.OnError
 
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
 
Constructor Summary
Taskdef()
          Default constructor.
 
Methods inherited from class org.apache.tools.ant.taskdefs.Definer
addDefinition, execute, getClassname, getFile, getName, getResource, loadProperties, setAdapter, setAdapterClass, setAdaptTo, setAdaptToClass, setClassname, setFile, setFormat, setName, setOnError, setResource
 
Methods inherited from class org.apache.tools.ant.taskdefs.DefBase
createClasspath, createLoader, getClasspath, getClasspathId, getLoaderId, init, isReverseLoader, setClasspath, setClasspathRef, setLoaderRef, setReverseLoader
 
Methods inherited from class org.apache.tools.ant.taskdefs.AntlibDefinition
getAntlibClassLoader, getURI, setAntlibClassLoader, setURI
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Taskdef

public Taskdef()
Default constructor. Creates a new Taskdef instance. This sets the adapter and the adaptto classes to TaskAdapter and Task.



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