org.codehaus.plexus.context

Interface Context

Known Implementing Classes:
DefaultContext

public interface Context

Method Summary

boolean
contains(Object key)
Object
get(Object key)
void
hide(Object key)
Hides the item in the context.
void
makeReadOnly()
Make the context read-only.
void
put(Object key, Object value)
Adds the item to the context.

Method Details

contains

public boolean contains(Object key)

get

public Object get(Object key)
            throws ContextException

hide

public void hide(Object key)
            throws IllegalStateException
Hides the item in the context. After remove(key) has been called, a get(key) will always fail, even if the parent context has such a mapping.
Parameters:
key - the items key

makeReadOnly

public void makeReadOnly()
Make the context read-only. Any attempt to write to the context via put() will result in an IllegalStateException.

put

public void put(Object key,
                Object value)
            throws IllegalStateException
Adds the item to the context.
Parameters:
key - the key of the item
value - the item