org.codehaus.plexus.context
Interface Context
Context of the plexus container.
boolean | contains(Object key) - Returns true if the map or the parent map contains the key.
|
Object | get(Object key) - Returns the value of the key.
|
Map | getContextData() - Utility method to retrieve containerContext data.
|
void | hide(Object key) - Hides the item in the containerContext.
|
void | makeReadOnly() - Make the containerContext read-only.
|
void | put(Object key, Object value) - Adds the item to the containerContext.
|
contains
public boolean contains(Object key)
Returns true if the map or the parent map contains the key.
key
- The key to search for.
- Returns true if the key was found.
get
public Object get(Object key)
throws ContextException
Returns the value of the key. If the key can't be found it will throw a exception.
key
- The key of the value to look up.
getContextData
public Map getContextData()
Utility method to retrieve containerContext data.
the returned Map is an unmodifiable view.
- the containerContext data
hide
public void hide(Object key)
throws IllegalStateException
Hides the item in the containerContext.
After remove(key) has been called, a get(key)
will always fail, even if the parent containerContext
has such a mapping.
makeReadOnly
public void makeReadOnly()
Make the containerContext read-only.
Any attempt to write to the containerContext via put()
will result in an IllegalStateException.
put
public void put(Object key,
Object value)
throws IllegalStateException
Adds the item to the containerContext.
key
- the key of the itemvalue
- the item