org.apache.tools.ant.property

Class LocalProperties

public class LocalProperties extends InheritableThreadLocal implements PropertyHelper.PropertyEvaluator, PropertyHelper.PropertySetter

Thread local class containing local properties.

Since: Ant 1.8.0

Method Summary
voidaddLocal(String property)
Add a local property to the current scope.
voidcopy()
Copy the stack for a parallel thread.
voidenterScope()
enter the scope
Objectevaluate(String property, PropertyHelper helper)
Evaluate a property.
voidexitScope()
exit the scope
static LocalPropertiesget(Project project)
Get a localproperties for the given project.
protected ObjectinitialValue()
Get the initial value.
booleanset(String property, Object value, PropertyHelper propertyHelper)
Set a property.
booleansetNew(String property, Object value, PropertyHelper propertyHelper)
Set a *new" property.

Method Detail

addLocal

public void addLocal(String property)
Add a local property to the current scope.

Parameters: property the property name to add.

copy

public void copy()
Copy the stack for a parallel thread. To be called from the parallel thread itself.

enterScope

public void enterScope()
enter the scope

evaluate

public Object evaluate(String property, PropertyHelper helper)
Evaluate a property.

Parameters: property the property's String "identifier". helper the invoking PropertyHelper.

Returns: Object value.

exitScope

public void exitScope()
exit the scope

get

public static LocalProperties get(Project project)
Get a localproperties for the given project.

Parameters: project the project to retieve the localproperties for.

Returns: the localproperties.

initialValue

protected Object initialValue()
Get the initial value.

Returns: a new localproperties stack.

set

public boolean set(String property, Object value, PropertyHelper propertyHelper)
Set a property.

Parameters: property the property's String "identifier". value the value to set. propertyHelper the invoking PropertyHelper.

Returns: true if this entity 'owns' the property.

setNew

public boolean setNew(String property, Object value, PropertyHelper propertyHelper)
Set a *new" property.

Parameters: property the property's String "identifier". value the value to set. propertyHelper the invoking PropertyHelper.

Returns: true if this entity 'owns' the property.