parameter |
Support of nested <parameter> element describing the signature of the method and the actual parameter to call it with
A single parameter and of a method call & its description. It holds class name, an explicit string value or
a name to find the value bound to.
Invariant:
- when class name is null or empty (not provided), then String class is implied. The class is searched
in the standard class loader.
- if value name is provided, then it defines the value to use. No type conversion is done. If no property
with that name is bound, null value will be used.
- if no value name provided, then the string value is used, no matter if it is provided or not and it is
converted to the target class using a constructor with a single String parameter.
If no string value provided, null value will be used.
Usage:
class X extends Task {
private final TypeValueDescriptor parameter = new TypeValueDescriptor(this); // used the constructor with Task
}
or
class X extends Task {
public void addConfiguredY(TypeValueDescriptor parameter) { // ANT calls the constructor with the Project parameter
parameter.setTask( this );
...
}
}
Parameters
Attribute |
Description |
Type |
class |
The name of the class of this parameter. Default: String |
String |
classpath |
The classpath to search for the parameter's class. Default: the ANT class path |
Path |
classpathRef |
The reference to classpath to search for the parameter's class. Default: the ANT class path |
Reference |
parentFirst |
The if the classpath provided should be searched after the ANT classpath. Default: true |
boolean |
property |
The name of the property that holds the value to send as a parameter value.
Default: this |
String |
signature |
The class to be used in the method' signature. Thus, a singing value and valueClassName
could describe an Object parameter as a signature class name. |
String |
value |
An explicit String value to send as a parameter value. If provided valueName is disregarded |
String |
|