public interface SimpleBeanManager
This interface provides simplified access to the most common needs that application code has from the bean manager; i.e. getting references to bean instances.
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 . |
javax.enterprise.inject.spi.BeanManager getDelegate()
BeanManager
.<T> T getBean(Class<T> type, Annotation... qualifiers)
type
- the type of bean desiredqualifiers
- qualifiers to constrain candidate beansjavax.enterprise.inject.UnsatisfiedResolutionException
- if there is no qualifying bean
of the given typejavax.enterprise.inject.AmbiguousResolutionException
- unless if there is more than one
qualifying bean of the given type<T> Set<T> getBeans(Class<T> type, Annotation... qualifiers)
type
- the type of beans desiredqualifiers
- qualifiers to constrain candidate beans<T> T getBean(String name, Class<T> type)
name
- name of the desired beantype
- the type of beans desiredjavax.enterprise.inject.UnsatisfiedResolutionException
- if there is no qualifying bean
of the given typejavax.enterprise.inject.AmbiguousResolutionException
- unless if there is more than one
qualifying bean of the given typeCopyright © 2014–2016 Carl Harris, Jr. All rights reserved.