< : Definer>


Base class for Taskdef and Typedef - handles all the attributes for Typedef. The uri and class handling is handled by DefBase


Attribute Description Type Required?
name Name of the definition String ?
uri String ?
classpath Path ?
file Name of the property file to load ant name/classname pairs from. File ?
classname The full class name of the object being defined. Required, unless file or resource have been specified. String ?
resource Name of the property resource to load ant name/classname pairs from. String ?
adaptto Set the classname of the class that the definition must be compatible with, either directly or by use of the adapter class. String ?
onerror What to do if there is an error in loading the class.
  • error - throw build exception
  • report - output at warning level
  • ignore - output at debug level
  • String ["fail", "report", "ignore"] ?
    loaderref Reference ?
    classpathref Reference ?
    adapter Set the class name of the adapter class. An adapter class is used to proxy the definition class. It is used if the definition class is not assignable to the adaptto class, or if the adaptto class is not present. String ?
    format Sets the format of the file or resource String ["properties", "xml"] ?
    reverseloader boolean ?

    Parameters accepted as nested elements

    <classpath> ...

    This object represents a path as used by CLASSPATH or PATH environment variable.

        <pathelement location="/path/to/file.jar" />
        <pathelement path="/path/to/file2.jar:/path/to/class2;/path/to/class3" />
        <pathelement location="/path/to/file3.jar" />
        <pathelement location="/path/to/file4.jar" />

    The object implemention sometask must provide a method called createSomepath which returns an instance of Path. Nested path definitions are handled by the Path object and must be labeled pathelement.

    The path element takes a parameter path which will be parsed and split into single elements. It will usually be used to define a path from an environment variable.

    Attribute Description Type Required
    refid Makes this instance in effect a reference to another Path instance.

    You must not set another attribute or nest elements inside this element if you make it a reference.

    Reference ?
    path Parses a path definition and creates single PathElements. String ?