@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,
Annotation... qualifiers) |
static void |
fireEvent(BeanManager beanManager,
Object event,
Annotation... qualifiers) |
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,
Annotation... qualifiers) |
static <T> T |
getInstance(BeanManager beanManager,
Class<T> beanClass,
boolean create,
Annotation... qualifiers) |
static <T> T |
getReference(BeanManager beanManager,
Bean<T> bean) |
static <T> T |
getReference(BeanManager beanManager,
Class<T> beanClass,
Annotation... qualifiers) |
static <S extends Annotation> |
isActive(BeanManager beanManager,
Class<S> scope) |
static <T> Bean<T> |
resolve(BeanManager beanManager,
Class<T> beanClass,
Annotation... qualifiers) |
public static <T> Bean<T> resolve(BeanManager beanManager, Class<T> beanClass, Annotation... qualifiers)
Beans.resolve(Class, Annotation...)
public static <T> T getReference(BeanManager beanManager, Class<T> beanClass, Annotation... qualifiers)
Beans.getReference(Class, Annotation...)
public static <T> T getReference(BeanManager beanManager, Bean<T> bean)
Beans.getReference(Bean)
public static <T> T getInstance(BeanManager beanManager, Class<T> beanClass, Annotation... qualifiers)
Beans.getInstance(Class, Annotation...)
public static <T> T getInstance(BeanManager beanManager, Class<T> beanClass, boolean create, Annotation... qualifiers)
public static <T> T getInstance(BeanManager beanManager, Bean<T> bean, boolean create)
Beans.getInstance(Bean, boolean)
public static <S extends Annotation> boolean isActive(BeanManager beanManager, Class<S> scope)
Beans.isActive(Class)
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, Annotation... qualifiers)
Beans.destroy(Class, Annotation...)
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)
public static void fireEvent(BeanManager beanManager, Object event, Annotation... qualifiers)
Beans.fireEvent(Object, Annotation...)
Copyright © 2012–2016 OmniFaces. All rights reserved.