public class CreationalContexts<T> extends Object implements AutoCloseable
| Constructor and Description |
|---|
CreationalContexts(javax.enterprise.inject.spi.BeanManager bm)
Create it
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close according to AutoCloseable
|
void |
closeIt()
close without checked exception
|
Object |
create(Class<T> clazz,
Class<? extends Annotation> scope)
create a bean of class clazz in context scope
|
Object |
create(javax.enterprise.context.spi.Contextual<T> b,
Class<? extends Annotation> scope)
create a bean in context
|
public CreationalContexts(javax.enterprise.inject.spi.BeanManager bm)
bm - the Weld-Beanmanagerpublic Object create(Class<T> clazz, Class<? extends Annotation> scope)
clazz - the clazz of the Bean to be createdscope - either ApplicationScoped or Dependentpublic Object create(javax.enterprise.context.spi.Contextual<T> b, Class<? extends Annotation> scope)
b - the Bean as described and found by the weld init.scope - either ApplicationScoped or Dependentpublic void closeIt()
public void close()
throws Exception
close in interface AutoCloseableException - check Exception should not occur.Copyright © 2017–2018. All rights reserved.