public class DelegatingSimpleBeanManager extends Object implements SimpleBeanManager
SimpleBeanManager
that delegates to a BeanManager
.Constructor and Description |
---|
DelegatingSimpleBeanManager(javax.enterprise.inject.spi.BeanManager delegate)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getBean(Class<T> type,
Annotation... qualifiers)
Gets a reference to a bean of the given type.
|
<T> T |
getBean(String name,
Class<T> type)
Gets a reference to a bean with the given name.
|
<T> Set<T> |
getBeans(Class<T> type,
Annotation... qualifiers)
Gets a set of references to beans of the given type.
|
javax.enterprise.inject.spi.BeanManager |
getDelegate()
Gets the underlying
BeanManager . |
public DelegatingSimpleBeanManager(javax.enterprise.inject.spi.BeanManager delegate)
delegate
- the bean manager delegatepublic javax.enterprise.inject.spi.BeanManager getDelegate()
BeanManager
.getDelegate
in interface SimpleBeanManager
public <T> T getBean(Class<T> type, Annotation... qualifiers)
getBean
in interface SimpleBeanManager
type
- the type of bean desiredqualifiers
- qualifiers to constrain candidate beanspublic <T> T getBean(String name, Class<T> type)
SimpleBeanManager
getBean
in interface SimpleBeanManager
name
- name of the desired beantype
- the type of beans desiredpublic <T> Set<T> getBeans(Class<T> type, Annotation... qualifiers)
getBeans
in interface SimpleBeanManager
type
- the type of beans desiredqualifiers
- qualifiers to constrain candidate beansCopyright © 2014–2016 Carl Harris, Jr. All rights reserved.