org.apache.tools.ant.taskdefs.optional

Class PropertyFile.Entry

public static class PropertyFile.Entry extends Object

Instance of this class represents nested elements of a task propertyfile.
Nested Class Summary
static classPropertyFile.Entry.Operation
Enumerated attribute with the values "+", "-", "="
static classPropertyFile.Entry.Type
Enumerated attribute with the values "int", "date" and "string".
Method Summary
protected voidexecuteOn(Properties props)
voidsetDefault(String value)
Initial value to set for a property if it is not already defined in the property file.
voidsetKey(String value)
Name of the property name/value pair
voidsetOperation(PropertyFile.Entry.Operation value)
operation to apply.
voidsetPattern(String value)
For int and date type only.
voidsetType(PropertyFile.Entry.Type value)
Regard the value as : int, date or string (default)
voidsetUnit(PropertyFile.Unit unit)
The unit of the value to be applied to date +/- operations.
voidsetValue(String value)
Value to set (=), to add (+) or subtract (-)

Method Detail

executeOn

protected void executeOn(Properties props)

setDefault

public void setDefault(String value)
Initial value to set for a property if it is not already defined in the property file. For type date, an additional keyword is allowed: "now"

setKey

public void setKey(String value)
Name of the property name/value pair

setOperation

public void setOperation(PropertyFile.Entry.Operation value)
operation to apply. "+" or "=" (default) for all datatypes; "-" for date and int only)\.

setPattern

public void setPattern(String value)
For int and date type only. If present, Values will be parsed and formatted accordingly.

setType

public void setType(PropertyFile.Entry.Type value)
Regard the value as : int, date or string (default)

setUnit

public void setUnit(PropertyFile.Unit unit)
The unit of the value to be applied to date +/- operations. Valid Values are: This only applies to date types using a +/- operation.

Since: Ant 1.5

setValue

public void setValue(String value)
Value to set (=), to add (+) or subtract (-)
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.