org.jboss.weld.context.beanstore
Class AbstractMapBackedBeanStore

java.lang.Object
  extended by org.jboss.weld.context.beanstore.AbstractMapBackedBeanStore
All Implemented Interfaces:
Iterable<String>, BeanStore
Direct Known Subclasses:
ConcurrentHashMapBeanStore, HashMapBeanStore

public abstract class AbstractMapBackedBeanStore
extends Object
implements BeanStore


Constructor Summary
AbstractMapBackedBeanStore()
           
 
Method Summary
 void clear()
          Clears the store of contextual instances
 boolean contains(String id)
          Check if the store contains an instance
protected abstract  Map<String,Object> delegate()
           
 boolean equals(Object obj)
           
<T> org.jboss.weld.context.api.ContextualInstance<T>
get(String id)
          Gets an instance of a contextual from the store
 Set<String> getContextualIds()
           
 int hashCode()
           
 Iterator<String> iterator()
           
<T> void
put(String id, org.jboss.weld.context.api.ContextualInstance<T> beanInstance)
          Adds a bean instance to the storage
 void remove(String id)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.weld.context.beanstore.BeanStore
lock
 

Constructor Detail

AbstractMapBackedBeanStore

public AbstractMapBackedBeanStore()
Method Detail

delegate

protected abstract Map<String,Object> delegate()

get

public <T> org.jboss.weld.context.api.ContextualInstance<T> get(String id)
Description copied from interface: BeanStore
Gets an instance of a contextual from the store

Specified by:
get in interface BeanStore
Parameters:
id - The id of the contextual to return
Returns:
The instance or null if not found

clear

public void clear()
Description copied from interface: BeanStore
Clears the store of contextual instances

Specified by:
clear in interface BeanStore

contains

public boolean contains(String id)
Description copied from interface: BeanStore
Check if the store contains an instance

Specified by:
contains in interface BeanStore
Parameters:
id - the id of the instance to check for
Returns:
true if the instance is present, otherwise false

remove

public void remove(String id)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getContextualIds

public Set<String> getContextualIds()

put

public <T> void put(String id,
                    org.jboss.weld.context.api.ContextualInstance<T> beanInstance)
Description copied from interface: BeanStore
Adds a bean instance to the storage

Specified by:
put in interface BeanStore
beanInstance - the contextual instance

toString

public String toString()
Overrides:
toString in class Object

iterator

public Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>
Specified by:
iterator in interface BeanStore


Copyright © 2013 Seam Framework. All Rights Reserved.