Package org.apache.tools.ant.property
Class LocalProperties
- java.lang.Object
- 
- java.lang.ThreadLocal<T>
- 
- java.lang.InheritableThreadLocal<LocalPropertyStack>
- 
- org.apache.tools.ant.property.LocalProperties
 
 
 
- 
- All Implemented Interfaces:
- PropertyHelper.Delegate,- PropertyHelper.PropertyEvaluator,- PropertyHelper.PropertySetter
 
 public class LocalProperties extends java.lang.InheritableThreadLocal<LocalPropertyStack> implements PropertyHelper.PropertyEvaluator, PropertyHelper.PropertySetter Thread local class containing local properties.- Since:
- Ant 1.8.0
 
- 
- 
Method SummaryModifier and Type Method Description voidaddLocal(java.lang.String property)Add a local property to the current scope.voidcopy()Copy the stack for a parallel thread.voidenterScope()enter the scopejava.lang.Objectevaluate(java.lang.String property, PropertyHelper helper)Evaluate a property.voidexitScope()exit the scopestatic LocalPropertiesget(Project project)Get a localproperties for the given project.protected LocalPropertyStackinitialValue()Get the initial value.booleanset(java.lang.String property, java.lang.Object value, PropertyHelper propertyHelper)Set a property.booleansetNew(java.lang.String property, java.lang.Object value, PropertyHelper propertyHelper)Set a *new" property.
 
- 
- 
- 
Method Detail- 
getpublic static LocalProperties get(Project project) Get a localproperties for the given project.- Parameters:
- project- the project to retrieve the localproperties for.
- Returns:
- the localproperties.
 
 - 
initialValueprotected LocalPropertyStack initialValue() Get the initial value.- Overrides:
- initialValuein class- java.lang.ThreadLocal<LocalPropertyStack>
- Returns:
- a new localproperties stack.
 
 - 
addLocalpublic void addLocal(java.lang.String property) Add 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.
 - 
evaluatepublic java.lang.Object evaluate(java.lang.String property, PropertyHelper helper)Evaluate a property.- Specified by:
- evaluatein interface- PropertyHelper.PropertyEvaluator
- Parameters:
- property- the property's String "identifier".
- helper- the invoking PropertyHelper.
- Returns:
- Object value.
 
 - 
setNewpublic boolean setNew(java.lang.String property, java.lang.Object value, PropertyHelper propertyHelper)Set 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.
 
 - 
setpublic boolean set(java.lang.String property, java.lang.Object value, PropertyHelper propertyHelper)Set 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.
 
 
- 
 
-