org.openbp.common.property
Interface RuntimeAttributeContainer


public interface RuntimeAttributeContainer

A runtime attribute container is an object that accepts key-value pairs as runtime attributes. Runtime attributes are used to store arbitrary values that cannot be determined at the time of the implementation of the object.
This is usually implemented using a simple map. However, the map should be allocated only if an attribute is set in order to save memory.
They are usually not written to/read from persistent storage when the object is being serialized/deserialized, thus the name runtime attributes. The dynamic property access mechanism implemented by the PropertyAccessUtil class supports runtime attribute containers.

Author:
Heiko Erhardt

Method Summary
 java.lang.Object getRuntimeAttribute(java.lang.String key)
          Gets a runtime attribute value.
 void removeRuntimeAttribute(java.lang.String key)
          Removes a runtime attribute.
 void setRuntimeAttribute(java.lang.String key, java.lang.Object value)
          Sets a runtime attribute value.
 

Method Detail

getRuntimeAttribute

java.lang.Object getRuntimeAttribute(java.lang.String key)
Gets a runtime attribute value.

Parameters:
key - Name of the attribute
Returns:
The value of the attribute or null if no such attribute exists

setRuntimeAttribute

void setRuntimeAttribute(java.lang.String key,
                         java.lang.Object value)
Sets a runtime attribute value.

Parameters:
key - Name of the attribute
value - Value of the attribute

removeRuntimeAttribute

void removeRuntimeAttribute(java.lang.String key)
Removes a runtime attribute.

Parameters:
key - Name of the attribute


Copyright © 2011. All Rights Reserved.