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)
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.ClassCastException - When the bean doesn't implement serializable.public <T> T getBean(Contextual<T> type)
null if there is none.T - The generic bean type.type - The contextual type of the CDI managed bean.null if there is none.public void destroyBeans()
Copyright © 2012–2020 OmniFaces. All rights reserved.