org.codehaus.plexus.context

Interface Context

public interface Context

Method Summary
booleancontains(Object key)
Objectget(Object key)
voidhide(Object key)
Hides the item in the context.
voidmakeReadOnly()
Make the context read-only.
voidput(Object key, Object value)
Adds the item to the context.

Method Detail

contains

public boolean contains(Object key)

get

public Object get(Object key)

hide

public void hide(Object key)
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

Throws: java.lang.IllegalStateException if context is read only

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)
Adds the item to the context.

Parameters: key the key of the item value the item

Throws: java.lang.IllegalStateException if context is read only