org.codehaus.plexus.context
Interface Context


public interface Context


Method Summary
 boolean contains(Object key)
           
 Object get(Object key)
           
 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.
 

Method Detail

get

Object get(Object key)
           throws ContextException
Throws:
ContextException

contains

boolean contains(Object key)

put

void put(Object key,
         Object value)
         throws IllegalStateException
Adds the item to the containerContext.

Parameters:
key - the key of the item
value - the item
Throws:
IllegalStateException - if containerContext is read only

hide

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.

Parameters:
key - the items key
Throws:
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.



Copyright © 2001-2011 Codehaus. All Rights Reserved.