org.apache.avalon.framework.context
public class DefaultContext extends Object implements Context, Serializable
Version: $Id: DefaultContext.java 35590 2004-08-02 09:48:59 -0500 (Mon, 02 Aug 2004) niclas $
Nested Class Summary | |
---|---|
static class | DefaultContext.Hidden |
Field Summary | |
---|---|
static DefaultContext.Hidden | HIDDEN_MAKER |
Map | m_contextData |
Context | m_parent |
boolean | m_readOnly |
Constructor Summary | |
---|---|
DefaultContext(Map contextData, Context parent)
Create a Context with specified data and parent.
| |
DefaultContext(Map contextData)
Create a Context with specified data.
| |
DefaultContext(Context parent)
Create a Context with specified parent.
| |
DefaultContext()
Create a Context with no parent.
|
Method Summary | |
---|---|
protected void | checkWriteable()
Utility method to check if context is writeable and if not throw exception.
|
boolean | equals(Object o) Check for equality between two DefaultContext objects.
|
Object | get(Object key)
Retrieve an item from the Context.
|
protected Map | getContextData()
Utility method to retrieve context data.
|
protected Context | getParent()
Get parent context if any.
|
int | hashCode() |
void | hide(Object key)
Hides the item in the context.
|
void | makeReadOnly()
Make the context read-only.
|
void | put(Object key, Object value)
Helper method fo adding items to Context.
|
Parameters: contextData the context data parent the parent Context (may be null)
Parameters: contextData the context data
Parameters: parent the parent Context (may be null)
Throws: IllegalStateException if context is read only
Equality is said to be true if, and only if, the following criteria are met;
Since: 4.5
Parameters: key the key of item
Returns: the item stored in context
Throws: ContextException if item not present
Returns: the context data
Returns: the parent Context (may be null)
Parameters: key the items key
Throws: IllegalStateException if context is read only
Parameters: key the items key value the item
Throws: IllegalStateException if context is read only