@Typed public final class BeansLocal extends Object
Collection of utility methods for the CDI API that are mainly shortcuts for obtaining stuff from the
BeanManager
.
The difference with Beans
is that no one method of BeansLocal
obtains the BeanManager
from
JNDI. This job is up to the caller. This is more efficient in situations where multiple utility methods needs to be
called at the same time.
Modifier and Type | Method and Description |
---|---|
static <T> void |
destroy(BeanManager beanManager,
Bean<T> bean) |
static <T> void |
destroy(BeanManager beanManager,
Class<T> beanClass) |
static <S extends Annotation> |
getActiveInstances(BeanManager beanManager,
Class<S> scope) |
static <A extends Annotation> |
getAnnotation(BeanManager beanManager,
Annotated annotated,
Class<A> annotationType) |
static InjectionPoint |
getCurrentInjectionPoint(BeanManager beanManager,
CreationalContext<?> creationalContext) |
static <T> T |
getInstance(BeanManager beanManager,
Bean<T> bean,
boolean create) |
static <T> T |
getInstance(BeanManager beanManager,
Class<T> beanClass) |
static <T> T |
getInstance(BeanManager beanManager,
Class<T> beanClass,
boolean create) |
static <T> T |
getReference(BeanManager beanManager,
Bean<T> bean) |
static <T> T |
getReference(BeanManager beanManager,
Class<T> beanClass) |
static <T> Bean<T> |
resolve(BeanManager beanManager,
Class<T> beanClass) |
public static <T> Bean<T> resolve(BeanManager beanManager, Class<T> beanClass)
Beans.resolve(Class)
public static <T> T getReference(BeanManager beanManager, Class<T> beanClass)
Beans.getReference(Class)
public static <T> T getReference(BeanManager beanManager, Bean<T> bean)
Beans.getReference(Bean)
public static <T> T getInstance(BeanManager beanManager, Class<T> beanClass)
Beans.getInstance(Class)
public static <T> T getInstance(BeanManager beanManager, Class<T> beanClass, boolean create)
Beans.getInstance(Class, boolean)
public static <T> T getInstance(BeanManager beanManager, Bean<T> bean, boolean create)
Beans.getInstance(Bean, boolean)
public static <S extends Annotation> Map<Object,String> getActiveInstances(BeanManager beanManager, Class<S> scope)
Beans.getActiveInstances(Class)
public static <T> void destroy(BeanManager beanManager, Class<T> beanClass)
Beans.destroy(Class)
public static <T> void destroy(BeanManager beanManager, Bean<T> bean)
Beans.destroy(Bean)
public static <A extends Annotation> A getAnnotation(BeanManager beanManager, Annotated annotated, Class<A> annotationType)
Beans.getAnnotation(Annotated, Class)
public static InjectionPoint getCurrentInjectionPoint(BeanManager beanManager, CreationalContext<?> creationalContext)
Beans.getAnnotation(Annotated, Class)
Copyright © 2012–2015 OmniFaces. All rights reserved.