public class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
annotationSetMatches(Set<? extends Annotation> annotations,
Class<? extends Annotation>... annotationTypes)
Checks if all annotations are in a given set of annotations
|
static <T> T |
deserialize(byte[] bytes) |
static <T> T |
evaluateValueExpression(BeanManagerImpl beanManager,
String expression,
Class<T> expectedType) |
static <T extends javax.enterprise.context.spi.Context> |
getActiveContext(org.jboss.weld.manager.api.WeldManager beanManager,
Class<T> type) |
static <T> javax.enterprise.inject.spi.Bean<T> |
getBean(javax.enterprise.inject.spi.BeanManager beanManager,
Type beanType,
Annotation... bindings) |
static <T> Set<javax.enterprise.inject.spi.Bean<T>> |
getBeans(javax.enterprise.inject.spi.BeanManager beanManager,
Class<T> type,
Annotation... bindings) |
static <T> Set<javax.enterprise.inject.spi.Bean<T>> |
getBeans(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.util.TypeLiteral<T> type,
Annotation... bindings) |
static <T> T |
getReference(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.spi.Bean<T> bean) |
static <T> T |
getReference(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.spi.Bean<T> bean,
Type beanType) |
static <T> T |
getReference(javax.enterprise.inject.spi.BeanManager beanManager,
Class<T> beanType,
Annotation... bindings) |
static Iterable<URL> |
getResources(Class<?> clazz,
String name) |
static boolean |
isExceptionInHierarchy(Throwable exception,
Class<? extends Throwable> expectedException) |
static boolean |
isProxy(Object proxy) |
static byte[] |
serialize(Object instance) |
static boolean |
typeSetMatches(Set<Type> types,
Type... requiredTypes) |
public static boolean annotationSetMatches(Set<? extends Annotation> annotations, Class<? extends Annotation>... annotationTypes)
annotations
- The annotation setannotationTypes
- The annotations to matchpublic static byte[] serialize(Object instance) throws IOException
IOException
public static <T> T deserialize(byte[] bytes) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public static boolean isExceptionInHierarchy(Throwable exception, Class<? extends Throwable> expectedException)
public static <T> javax.enterprise.inject.spi.Bean<T> getBean(javax.enterprise.inject.spi.BeanManager beanManager, Type beanType, Annotation... bindings)
public static <T> Set<javax.enterprise.inject.spi.Bean<T>> getBeans(javax.enterprise.inject.spi.BeanManager beanManager, Class<T> type, Annotation... bindings)
public static <T> Set<javax.enterprise.inject.spi.Bean<T>> getBeans(javax.enterprise.inject.spi.BeanManager beanManager, javax.enterprise.util.TypeLiteral<T> type, Annotation... bindings)
public static <T> T getReference(javax.enterprise.inject.spi.BeanManager beanManager, Class<T> beanType, Annotation... bindings)
public static <T> T getReference(javax.enterprise.inject.spi.BeanManager beanManager, javax.enterprise.inject.spi.Bean<T> bean)
public static <T> T getReference(javax.enterprise.inject.spi.BeanManager beanManager, javax.enterprise.inject.spi.Bean<T> bean, Type beanType)
public static <T> T evaluateValueExpression(BeanManagerImpl beanManager, String expression, Class<T> expectedType)
public static boolean isProxy(Object proxy)
public static <T extends javax.enterprise.context.spi.Context> T getActiveContext(org.jboss.weld.manager.api.WeldManager beanManager, Class<T> type)
Copyright © 2016. All rights reserved.