LocalProperties (Apache Ant API)

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.property
Class LocalProperties

    java.lang.Object
      java.lang.ThreadLocal<T>
          java.lang.InheritableThreadLocal
              org.apache.tools.ant.property.LocalProperties

All Implemented Interfaces:
  PropertyHelper.Delegate, PropertyHelper.PropertyEvaluator, PropertyHelper.PropertySetter

    public class LocalProperties

extends java.lang.InheritableThreadLocal
implements PropertyHelper.PropertyEvaluator, PropertyHelper.PropertySetter

Thread local class containing local properties.

Since:
  Ant 1.8.0

Method Summary
`void` | `addLocal(java.lang.String property)` Add a local property to the current scope.
`void` | `copy()` Copy the stack for a parallel thread.
`void` | `enterScope()` enter the scope
`java.lang.Object` | `evaluate(java.lang.String property, PropertyHelper helper)` Evaluate a property.
`void` | `exitScope()` exit the scope
`static LocalProperties` | `get(Project project)` Get a localproperties for the given project.
`protected java.lang.Object` | `initialValue()` Get the initial value.
`boolean` | `set(java.lang.String property, java.lang.Object value, PropertyHelper propertyHelper)` Set a property.
`boolean` | `setNew(java.lang.String property, java.lang.Object value, PropertyHelper propertyHelper)` Set a *new" property.

Methods inherited from class java.lang.InheritableThreadLocal
`childValue`

Methods inherited from class java.lang.ThreadLocal
`get, remove, set`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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 java.lang.Object initialValue()

  Get the initial value.

  Overrides:
    `initialValue` in class `java.lang.ThreadLocal`
  Returns:
    a new localproperties stack.

### addLocal

    public void addLocal(java.lang.String property)

  Add a local property to the current scope.

  Parameters:
    `property` - the property name to add.

### enterScope

    public void enterScope()

  enter the scope

### exitScope

    public void exitScope()

  exit the scope

### copy

    public void copy()

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

### evaluate

    public java.lang.Object evaluate(java.lang.String property,
                                     PropertyHelper helper)

  Evaluate a property.

  Specified by:
    `evaluate` in interface `PropertyHelper.PropertyEvaluator`
  Parameters:
    `property` - the property's String "identifier".
    `helper` - the invoking PropertyHelper.
  Returns:
    Object value.

### setNew

    public boolean setNew(java.lang.String property,
                          java.lang.Object value,
                          PropertyHelper propertyHelper)

  Set a *new" property.

  Specified by:
    `setNew` in 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.

### set

    public boolean set(java.lang.String property,
                       java.lang.Object value,
                       PropertyHelper propertyHelper)

  Set a property.

  Specified by:
    `set` in 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.

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD