edu.memphis.ccrg.lida.framework.initialization
Class GlobalInitializer

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.GlobalInitializer

public class GlobalInitializer
extends java.lang.Object

This class is intended for use by Initializers during initialization only. It allows Initializers to access the same attributes. Attributes can be added by an Initializer and retrieved later by any other Initializer.

Author:
Javier Snaider, Ryan J. McCall

Method Summary
 void clearAttributes()
          Deletes all attributes
 java.lang.Object getAttribute(java.lang.String key)
          Returns the value associated with a key
static GlobalInitializer getInstance()
          Returns the sole instance of this class.
 java.lang.Object removeAttribute(java.lang.String key)
          Removes the attribute associated with
 void setAttribute(java.lang.String key, java.lang.Object value)
          Sets an attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GlobalInitializer getInstance()
Returns the sole instance of this class. Implements the Singleton pattern.

Returns:
instance sole instance of this class

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Returns the value associated with a key

Parameters:
key - the key
Returns:
the value associated with key

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Sets an attribute

Parameters:
key - the key of the attribute
value - the value to associate with key

removeAttribute

public java.lang.Object removeAttribute(java.lang.String key)
Removes the attribute associated with

Parameters:
key - the key
Returns:
The last value of the attribute

clearAttributes

public void clearAttributes()
Deletes all attributes