org.jboss.weld.context.api.helpers
Class AbstractMapBackedBeanStore

java.lang.Object
  extended by org.jboss.weld.context.api.helpers.AbstractMapBackedBeanStore
All Implemented Interfaces:
BeanStore
Direct Known Subclasses:
ConcurrentHashMapBeanStore

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


Constructor Summary
AbstractMapBackedBeanStore()
           
 
Method Summary
 void clear()
          Clears the store
protected abstract  java.util.Map<java.lang.String,ContextualInstance<? extends java.lang.Object>> delegate()
           
<T> ContextualInstance<T>
get(java.lang.String id)
          Gets an instance from the store
 java.util.Set<java.lang.String> getContextualIds()
          Returns the beans contained in the store
<T> void
put(java.lang.String id, ContextualInstance<T> beanInstance)
          Puts a bean instance under the bean key in the store
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMapBackedBeanStore

public AbstractMapBackedBeanStore()
Method Detail

delegate

protected abstract java.util.Map<java.lang.String,ContextualInstance<? extends java.lang.Object>> delegate()

get

public <T> ContextualInstance<T> get(java.lang.String id)
Gets an instance from the store

Specified by:
get in interface BeanStore
Parameters:
The - bean to look for
Returns:
An instance, if found
See Also:
org.jboss.weld.context.api.BeanStore#get(BaseBean)

clear

public void clear()
Clears the store

Specified by:
clear in interface BeanStore
See Also:
BeanStore.clear()

getContextualIds

public java.util.Set<java.lang.String> getContextualIds()
Returns the beans contained in the store

Specified by:
getContextualIds in interface BeanStore
Returns:
The beans present
See Also:
org.jboss.weld.context.api.BeanStore#getContextuals()

put

public <T> void put(java.lang.String id,
                    ContextualInstance<T> beanInstance)
Puts a bean instance under the bean key in the store

Specified by:
put in interface BeanStore
Parameters:
bean - The bean
instance - the instance
See Also:
org.jboss.weld.context.api.BeanStore#put(Contextual, Object)

toString

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


Copyright © 2008-2009 Seam Framework. All Rights Reserved.