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

public Class LocalPropertyStack

extends Object
Class Inheritance
Imports
java.util.AbstractCollection, .Collections, .Deque, .HashSet, .LinkedList, .Map, .Set, java.util.concurrent.ConcurrentHashMap, java.util.stream.Collector, org.apache.tools.ant.PropertyHelper

A stack of local property maps. There is a map for each scope (target, sequential, macro).
Since
Ant 1.8.0

Field Summary

Modifier and TypeField and Description
private final Object
private final Deque<Map<String, Object>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addLocal(String
the name of the local property.
property
)

Add a local property.

public LocalPropertyStack

Returns:

a copy.
copy
()

Copy the stack for a parallel thread.

public void
enterScope()

Enter the local scope.

public Object

Returns:

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

Evaluate a property.

public void
exitScope()

Exit the local scope.

private Map<String, Object>
public Set<String>

Returns:

the names of all known local properties.
getPropertyNames
()

Returns the names of all known local properties.

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
)

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
)

Set a *new" property.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOCKback to summary
private final Object LOCK
stackback to summary
private final Deque<Map<String, Object>> stack

Constructor Detail

LocalPropertyStackback to summary
public LocalPropertyStack()

Method Detail

addLocalback to summary
public void addLocal(String property)

Add a local property.

Parameters
property:String

the name of the local property.

copyback to summary
public LocalPropertyStack copy()

Copy the stack for a parallel thread.

Returns:LocalPropertyStack

a copy.

enterScopeback to summary
public void enterScope()

Enter the local scope.

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

Evaluate a property.

Parameters
property:String

the property's String "identifier".

helper:PropertyHelper

the invoking PropertyHelper.

Returns:Object

Object value.

exitScopeback to summary
public void exitScope()

Exit the local scope.

getMapForPropertyback to summary
private Map<String, Object> getMapForProperty(String property)
getPropertyNamesback to summary
public Set<String> getPropertyNames()

Returns the names of all known local properties.

Returns:Set<String>

the names of all known local properties.

Since
1.10.9
setback to summary
public boolean set(String property, Object value, PropertyHelper propertyHelper)

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.

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

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.