org.jboss.webbeans.context.api.helpers
Class ForwardingBeanStore

java.lang.Object
  extended by org.jboss.webbeans.context.api.helpers.ForwardingBeanStore
All Implemented Interfaces:
BeanStore

public abstract class ForwardingBeanStore
extends java.lang.Object
implements BeanStore


Constructor Summary
ForwardingBeanStore()
           
 
Method Summary
 void clear()
          Clears the storage of any bean instances
protected abstract  BeanStore delegate()
           
 boolean equals(java.lang.Object obj)
           
<T> T
get(Contextual<? extends T> bean)
          Gets an instance of a bean from the storage.
 java.lang.Iterable<Contextual<? extends java.lang.Object>> getBeans()
          Returns an Iterable over the current contents in the storage
 int hashCode()
           
<T> void
put(Contextual<? extends T> bean, T instance)
          Adds a bean instance to the storage
<T> T
remove(Contextual<? extends T> bean)
          Removes an instance of a bean from the storage
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingBeanStore

public ForwardingBeanStore()
Method Detail

delegate

protected abstract BeanStore delegate()

clear

public void clear()
Description copied from interface: BeanStore
Clears the storage of any bean instances

Specified by:
clear in interface BeanStore

get

public <T> T get(Contextual<? extends T> bean)
Description copied from interface: BeanStore
Gets an instance of a bean from the storage.

Specified by:
get in interface BeanStore
Parameters:
bean - The bean whose instance to return
Returns:
The instance. Null if not found

getBeans

public java.lang.Iterable<Contextual<? extends java.lang.Object>> getBeans()
Description copied from interface: BeanStore
Returns an Iterable over the current contents in the storage

Specified by:
getBeans in interface BeanStore
Returns:
An Iterable over the keys in the storage

put

public <T> void put(Contextual<? extends T> bean,
                    T instance)
Description copied from interface: BeanStore
Adds a bean instance to the storage

Specified by:
put in interface BeanStore
Parameters:
bean - The bean type. Used as key
instance - The instance to add

remove

public <T> T remove(Contextual<? extends T> bean)
Description copied from interface: BeanStore
Removes an instance of a bean from the storage

Specified by:
remove in interface BeanStore
Parameters:
bean - The bean whose instance to remove
Returns:
The removed instance. Null if not found in storage.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2011. All Rights Reserved.