Top Description Constructors Methods
org.apache.tools.ant.property

public Class LocalProperties

extends InheritableThreadLocal<LocalPropertyStack>
implements PropertyEvaluator, PropertySetter, PropertyEnumerator
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.PropertyHelper.PropertyEnumerator, org.apache.tools.ant.PropertyHelper.Delegate, org.apache.tools.ant.PropertyHelper.PropertySetter, org.apache.tools.ant.PropertyHelper.PropertyEvaluator
Imports
org.apache.tools.ant.MagicNames, .Project, .PropertyHelper, java.util.Set

Thread local class containing local properties.
Since
Ant 1.8.0

Constructor Summary

AccessConstructor and Description
private
LocalProperties()

Construct a new LocalProperties object.

Method Summary

Modifier and TypeMethod and Description
public void
addLocal(String
the property name to add.
property
)

Add a local property to the current scope.

public void
copy()

Copy the stack for a parallel thread.

public void
enterScope()

enter the scope

public Object

Returns:

Object value.
evaluate
(String
the property's String "identifier".
property
,
PropertyHelper
the invoking PropertyHelper.
helper
)

Implements org.apache.tools.ant.PropertyHelper.PropertyEvaluator.evaluate.

Evaluate a property.
public void
exitScope()

exit the scope

public static synchronized LocalProperties

Returns:

the localproperties.
get
(Project
the project to retrieve the localproperties for.
project
)

Get a localproperties for the given project.

public Set<String>
getPropertyNames()

Implements org.apache.tools.ant.PropertyHelper.PropertyEnumerator.getPropertyNames.

Returns the names of all properties known to this delegate.
protected synchronized LocalPropertyStack

Returns:

a new localproperties stack.
initialValue
()

Overrides java.lang.ThreadLocal.initialValue.

Get the initial value.
public boolean

Returns:

true if this entity 'owns' the property.
set
(String
the property's String "identifier".
property
,
Object
the value to set.
value
,
PropertyHelper
the invoking PropertyHelper.
propertyHelper
)

Implements org.apache.tools.ant.PropertyHelper.PropertySetter.set.

Set a property.
public boolean

Returns:

true if this entity 'owns' the property.
setNew
(String
the property's String "identifier".
property
,
Object
the value to set.
value
,
PropertyHelper
the invoking PropertyHelper.
propertyHelper
)

Implements org.apache.tools.ant.PropertyHelper.PropertySetter.setNew.

Set a *new" property.
Inherited from java.lang.InheritableThreadLocal:
childValue

Constructor Detail

LocalPropertiesback to summary
private LocalProperties()

Construct a new LocalProperties object.

Method Detail

addLocalback to summary
public void addLocal(String property)

Add a local property to the current scope.

Parameters
property:String

the property name to add.

copyback to summary
public void copy()

Copy the stack for a parallel thread. To be called from the parallel thread itself.

enterScopeback to summary
public void enterScope()

enter the scope

evaluateback to summary
public Object evaluate(String property, PropertyHelper helper)

Implements org.apache.tools.ant.PropertyHelper.PropertyEvaluator.evaluate.

Evaluate a property.

Parameters
property:String

the property's String "identifier".

helper:PropertyHelper

the invoking PropertyHelper.

Returns:Object

Object value.

Annotations
@Override
exitScopeback to summary
public void exitScope()

exit the scope

getback to summary
public static synchronized LocalProperties get(Project project)

Get a localproperties for the given project.

Parameters
project:Project

the project to retrieve the localproperties for.

Returns:LocalProperties

the localproperties.

getPropertyNamesback to summary
public Set<String> getPropertyNames()

Implements org.apache.tools.ant.PropertyHelper.PropertyEnumerator.getPropertyNames.

Doc from org.apache.tools.ant.PropertyHelper.PropertyEnumerator.getPropertyNames.

Returns the names of all properties known to this delegate.

Returns:Set<String>

the names of all properties known to this delegate.

Annotations
@Override
initialValueback to summary
protected synchronized LocalPropertyStack initialValue()

Overrides java.lang.ThreadLocal.initialValue.

Get the initial value.

Returns:LocalPropertyStack

a new localproperties stack.

Annotations
@Override
setback to summary
public boolean set(String property, Object value, PropertyHelper propertyHelper)

Implements org.apache.tools.ant.PropertyHelper.PropertySetter.set.

Set a property.

Parameters
property:String

the property's String "identifier".

value:Object

the value to set.

propertyHelper:PropertyHelper

the invoking PropertyHelper.

Returns:boolean

true if this entity 'owns' the property.

Annotations
@Override
setNewback to summary
public boolean setNew(String property, Object value, PropertyHelper propertyHelper)

Implements org.apache.tools.ant.PropertyHelper.PropertySetter.setNew.

Set a *new" property.

Parameters
property:String

the property's String "identifier".

value:Object

the value to set.

propertyHelper:PropertyHelper

the invoking PropertyHelper.

Returns:boolean

true if this entity 'owns' the property.

Annotations
@Override