org.apache.tools.ant.types
public class PropertySet extends DataType implements ResourceCollection
Since: Ant 1.6
Nested Class Summary | |
---|---|
static class | PropertySet.BuiltinPropertySetName
Used for propertyref's builtin attribute. |
static class | PropertySet.PropertyRef
This is a nested class containing a reference to some properties
and optionally a source of properties. |
Method Summary | |
---|---|
void | add(FileNameMapper fileNameMapper)
Add a nested FileNameMapper. |
void | addPropertyref(PropertySet.PropertyRef ref)
Add a property reference (nested element) to the references to be used. |
void | addPropertyset(PropertySet ref)
Add another property set to this set. |
void | appendBuiltin(PropertySet.BuiltinPropertySetName b)
Allow builtin (all, system or commandline) properties in the set. |
void | appendName(String name)
Allow properties of a particular name in the set. |
void | appendPrefix(String prefix)
Allow properties whose names start with a prefix in the set. |
void | appendRegex(String regex)
Allow properties whose names match a regex in the set. |
protected void | assertNotReference()
Ensures this data type is not a reference.
|
Mapper | createMapper()
Create a mapper to map the property names. |
boolean | getDynamic()
Get the dynamic attribute. |
Mapper | getMapper()
Get the mapper attribute. |
Properties | getProperties()
This is the operation to get the existing or recalculated properties. |
protected PropertySet | getRef()
Performs the check for circular references and returns the
referenced PropertySet. |
boolean | isFilesystemOnly()
Fulfill the ResourceCollection contract. |
Iterator | iterator()
Fulfill the ResourceCollection interface. |
void | setDynamic(boolean dynamic)
Set whether to reevaluate the set everytime the set is used.
|
void | setMapper(String type, String from, String to)
Set a mapper to change property names. |
void | setNegate(boolean negate)
Set whether to negate results.
|
void | setRefid(Reference r)
Sets the value of the refid attribute.
|
int | size()
Fulfill the ResourceCollection contract. |
String | toString()
A debug toString.
|
Parameters: fileNameMapper the mapper to add.
Since: Ant 1.6.3
Parameters: ref a property reference.
Parameters: ref another property set.
Parameters: b the type of builtin properties.
Parameters: name the property name to allow.
Parameters: prefix the prefix to use.
Parameters: regex the regular expression to use.
Calling this method as the first line of every bean method of this data type (setXyz, addXyz, createXyz) ensure proper handling of the refid attribute.
Throws: BuildException if the refid attribute was already set, since refid and all other attributes are mutually exclusive.
Returns: a mapper to be configured.
Returns: true if the property set is to be evalulated each time it is used.
Returns: the mapper attribute.
Returns: the properties for this propertyset.
Returns: the referenced PropertySet.
Returns: whether this is a filesystem-only resource collection.
Returns: an Iterator of Resources.
Since: Ant 1.7
Parameters: dynamic if true, reevaluate the property set each time the set is used. if false cache the property set the first time and use the cached set on subsequent occasions.
Parameters: type mapper type. from source pattern. to output pattern.
Parameters: negate if true, negate the selection criteria.
Parameters: r the reference this datatype should point to.
Throws: BuildException if another attribute was set, since refid and all other attributes are mutually exclusive.
Returns: the size of this ResourceCollection.
Returns: a string rep of this object.