public final class Reflections extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
cast(Object obj) |
static <T> Class<T> |
classForName(org.jboss.weld.resources.spi.ResourceLoader resourceLoader,
String className)
First try to load a class using the specified ResourceLoader.
|
static boolean |
containsAnnotation(Class<?> javaClass,
Class<? extends Annotation> requiredAnnotation) |
static boolean |
hasBeanDefiningMetaAnnotationSpecified(Annotation[] annotations,
Class<? extends Annotation> metaAnnotationType) |
static boolean |
isClassLoadable(org.jboss.weld.resources.spi.ResourceLoader resourceLoader,
String className) |
static <T> Class<T> |
loadClass(org.jboss.weld.resources.spi.ResourceLoader resourceLoader,
String className) |
public static boolean containsAnnotation(Class<?> javaClass, Class<? extends Annotation> requiredAnnotation)
public static <T> T cast(Object obj)
public static boolean isClassLoadable(org.jboss.weld.resources.spi.ResourceLoader resourceLoader, String className)
resourceLoader
- className
- true
if a class with the given name can be loaded, false
otherwiseloadClass(ResourceLoader, String)
public static <T> Class<T> loadClass(org.jboss.weld.resources.spi.ResourceLoader resourceLoader, String className)
resourceLoader
- className
- classForName(ResourceLoader, String)
public static <T> Class<T> classForName(org.jboss.weld.resources.spi.ResourceLoader resourceLoader, String className)
Class.forName(String)
as a fallback.resourceLoader
- className
- public static boolean hasBeanDefiningMetaAnnotationSpecified(Annotation[] annotations, Class<? extends Annotation> metaAnnotationType)
annotations
- metaAnnotationType
- true
if any of the annotations specified has the given meta annotation type specified, false
otherwiseCopyright © 2017. All rights reserved.