Package org.codehaus.plexus.context
Interface Context
-
public interface Context
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(java.lang.Object key)java.lang.Objectget(java.lang.Object key)voidhide(java.lang.Object key)Hides the item in the containerContext.voidmakeReadOnly()Make the containerContext read-only.voidput(java.lang.Object key, java.lang.Object value)Adds the item to the containerContext.
-
-
-
Method Detail
-
get
java.lang.Object get(java.lang.Object key) throws ContextException- Throws:
ContextException
-
contains
boolean contains(java.lang.Object key)
-
put
void put(java.lang.Object key, java.lang.Object value) throws java.lang.IllegalStateExceptionAdds the item to the containerContext.- Parameters:
key- the key of the itemvalue- the item- Throws:
java.lang.IllegalStateException- if containerContext is read only
-
hide
void hide(java.lang.Object key) throws java.lang.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.- Parameters:
key- the items key- Throws:
java.lang.IllegalStateException- if containerContext is read only
-
makeReadOnly
void makeReadOnly()
Make the containerContext read-only. Any attempt to write to the containerContext via put() will result in an IllegalStateException.
-
-