org.codehaus.plexus.context
Interface Context

All Known Implementing Classes:
DefaultContext

public interface Context


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

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.IllegalStateException
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

hide

void hide(java.lang.Object key)
          throws java.lang.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
Throws:
java.lang.IllegalStateException - if context is read only

makeReadOnly

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



Copyright © 2001-2006 Codehaus. All Rights Reserved.