Package org.apache.tools.ant.property
Class LocalProperties
- All Implemented Interfaces:
- PropertyHelper.Delegate,- PropertyHelper.PropertyEnumerator,- PropertyHelper.PropertyEvaluator,- PropertyHelper.PropertySetter
public class LocalProperties
extends InheritableThreadLocal<LocalPropertyStack>
implements PropertyHelper.PropertyEvaluator, PropertyHelper.PropertySetter, PropertyHelper.PropertyEnumerator
Thread local class containing local properties.
- Since:
- Ant 1.8.0
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a local property to the current scope.voidcopy()Copy the stack for a parallel thread.voidenter the scopeevaluate(String property, PropertyHelper helper) Evaluate a property.voidexit the scopestatic LocalPropertiesGet a localproperties for the given project.Returns the names of all properties known to this delegate.protected LocalPropertyStackGet the initial value.booleanset(String property, Object value, PropertyHelper propertyHelper) Set a property.booleansetNew(String property, Object value, PropertyHelper propertyHelper) Set a *new" property.Methods inherited from class java.lang.InheritableThreadLocalchildValueMethods inherited from class java.lang.ThreadLocalget, remove, set, withInitial
- 
Method Details- 
getGet a localproperties for the given project.- Parameters:
- project- the project to retrieve the localproperties for.
- Returns:
- the localproperties.
 
- 
initialValueGet the initial value.- Overrides:
- initialValuein class- ThreadLocal<LocalPropertyStack>
- Returns:
- a new localproperties stack.
 
- 
addLocalAdd a local property to the current scope.- Parameters:
- property- the property name to add.
 
- 
enterScopepublic void enterScope()enter the scope
- 
exitScopepublic void exitScope()exit the scope
- 
copypublic void copy()Copy the stack for a parallel thread. To be called from the parallel thread itself.
- 
evaluateEvaluate a property.- Specified by:
- evaluatein interface- PropertyHelper.PropertyEvaluator
- Parameters:
- property- the property's String "identifier".
- helper- the invoking PropertyHelper.
- Returns:
- Object value.
 
- 
setNewSet a *new" property.- Specified by:
- setNewin interface- PropertyHelper.PropertySetter
- Parameters:
- property- the property's String "identifier".
- value- the value to set.
- propertyHelper- the invoking PropertyHelper.
- Returns:
- true if this entity 'owns' the property.
 
- 
setSet a property.- Specified by:
- setin interface- PropertyHelper.PropertySetter
- Parameters:
- property- the property's String "identifier".
- value- the value to set.
- propertyHelper- the invoking PropertyHelper.
- Returns:
- true if this entity 'owns' the property.
 
- 
getPropertyNamesDescription copied from interface:PropertyHelper.PropertyEnumeratorReturns the names of all properties known to this delegate.- Specified by:
- getPropertyNamesin interface- PropertyHelper.PropertyEnumerator
- Returns:
- the names of all properties known to this delegate.
 
 
-