Weaver 3.1.0a1-D1

com.oldlight.weaver.interpreter
Class WeaverLocalContextImpl

java.lang.Object
  extended bycom.oldlight.weaver.interpreter.WeaverLocalContextImpl
All Implemented Interfaces:
WeaverLocalContext

public class WeaverLocalContextImpl
extends Object
implements WeaverLocalContext

Stores local-scoped attributes.

Author:
Paul Harvey

Field Summary
private  HashMap attributes
           
 
Constructor Summary
WeaverLocalContextImpl()
           
 
Method Summary
 Object getAttribute(String name)
          Get a locally scoped attribute.
 Map getAttributeMap()
          Get a attribute name to value map.
 void removeAttribute(String name)
          Remove a locally scoped attribute.
 void setAttribute(String name, Object value)
          Set a locally scoped attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

private HashMap attributes
Constructor Detail

WeaverLocalContextImpl

public WeaverLocalContextImpl()
Method Detail

setAttribute

public void setAttribute(String name,
                         Object value)
Set a locally scoped attribute.

Specified by:
setAttribute in interface WeaverLocalContext
Parameters:
name - Name of the attribute to set.
value - Value to set the attribute to.

getAttribute

public Object getAttribute(String name)
Get a locally scoped attribute.

Specified by:
getAttribute in interface WeaverLocalContext
Parameters:
name - Name of the attribute to retrieve.
Returns:
The retrieved value or null if the value cannot be found.

removeAttribute

public void removeAttribute(String name)
Remove a locally scoped attribute.

Specified by:
removeAttribute in interface WeaverLocalContext
Parameters:
name - Name of the attribute to remove.

getAttributeMap

public Map getAttributeMap()
Get a attribute name to value map. (This method is used by the EL variable resolver).

Returns:
Attribute name to value map.

Copyright ©Paul Harvey