public class ProgrammaticBeanLookup extends Object
Constructor and Description |
---|
ProgrammaticBeanLookup() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
lookup(Class<T> clazz) |
static <T> T |
lookup(Class<T> clazz,
javax.enterprise.inject.spi.BeanManager bm) |
static <T> T |
lookup(Class<T> clazz,
javax.enterprise.inject.spi.BeanManager bm,
boolean optional) |
static <T> T |
lookup(Class<T> clazz,
boolean optional) |
static Object |
lookup(String name) |
static Object |
lookup(String name,
javax.enterprise.inject.spi.BeanManager bm) |
static Object |
lookup(String name,
javax.enterprise.inject.spi.BeanManager bm,
boolean optional) |
public static final Logger LOG
public static <T> T lookup(Class<T> clazz, javax.enterprise.inject.spi.BeanManager bm)
public static <T> T lookup(Class<T> clazz, javax.enterprise.inject.spi.BeanManager bm, boolean optional)
public static Object lookup(String name, javax.enterprise.inject.spi.BeanManager bm, boolean optional)
public static <T> T lookup(Class<T> clazz)
javax.enterprise.inject.AmbiguousResolutionException
- if the given type is satisfied by more than one Beanlookup(Class, boolean)
public static <T> T lookup(Class<T> clazz, boolean optional)
optional
- if false
then the bean must exist.false
. If optional is true
null might be returned if no bean got found.IllegalStateException
- if there is no bean of the given class, but only if optional is false
javax.enterprise.inject.AmbiguousResolutionException
- if the given type is satisfied by more than one Beanlookup(Class, boolean)
Copyright © 2019. All rights reserved.