Typedef (Apache Ant API)

org.apache.tools.ant.taskdefs
Class Typedef


java.lang.Object

  |

  +--org.apache.tools.ant.ProjectComponent

        |

        +--org.apache.tools.ant.Task

              |

              +--org.apache.tools.ant.taskdefs.Definer

                    |

                    +--org.apache.tools.ant.taskdefs.Typedef


public class Typedef
extends Definer

Adds a data type definition to the current project. Two attributes are needed, the name that identifies this data type uniquely, and the full name of the class (including the packages) that implements this type.

You can also define a group of data types 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 data type in the format:

 typename=fully.qualified.java.classname
 

Typedef should be used to add your own types to the system. Data types are things likepaths or filesets that can be defined at the project level and referenced via their ID attribute.

Custom data types usually need custom tasks to put them to good use.

Since:
Ant 1.4
Author:
Stefan Bodewig

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
Typedef()
           
 
Method Summary
protected  void addDefinition(java.lang.String name, java.lang.Class c)
          implement abstract callback of parent class
 
Methods inherited from class org.apache.tools.ant.taskdefs.Definer
createClasspath, execute, getClassname, setClassname, setClasspath, setClasspathRef, setFile, setLoaderRef, setName, setResource, setReverseLoader
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
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

Typedef


public Typedef()
Method Detail

addDefinition


protected void addDefinition(java.lang.String name,
                             java.lang.Class c)
                      throws BuildException
implement abstract callback of parent class

Specified by:
addDefinition in class Definer
BuildException


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.