public class BeanStorage extends Object implements Serializable
Constructor and Description |
---|
BeanStorage(int initialCapacity)
Construct a new CDI bean storage with the given initial capacity of the map holding all beans.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
createBean(Contextual<T> type,
CreationalContext<T> context)
Create and return the bean associated with given context and creational context.
|
void |
destroyBeans()
Destroy all beans managed so far.
|
<T> T |
getBean(Contextual<T> type,
BeanManager manager)
Returns the bean associated with the given context, or
null if there is none. |
public BeanStorage(int initialCapacity)
initialCapacity
- The initial capacity of the map holding all beans.public <T> T createBean(Contextual<T> type, CreationalContext<T> context)
T
- The generic bean type.type
- The contextual type of the CDI managed bean.context
- The context to create the bean in.public <T> T getBean(Contextual<T> type, BeanManager manager)
null
if there is none.T
- The generic bean type.type
- The contextual type of the CDI managed bean.manager
- The bean manager used to create the creational context, if necessary.null
if there is none.public void destroyBeans()
Copyright © 2012–2015 OmniFaces. All rights reserved.