Class Reflections

java.lang.Object
org.jboss.as.weld.util.Reflections

public class Reflections extends Object
Author:
Stuart Douglas
  • Constructor Details

    • Reflections

      public Reflections()
  • Method Details

    • cast

      public static <T> T cast(Object obj)
    • newInstance

      public static <T> T newInstance(String className, ClassLoader classLoader)
    • isAccessible

      public static boolean isAccessible(String className, ClassLoader classLoader)
    • loadClass

      public static <T> Class<T> loadClass(String className, ClassLoader classLoader)
    • containsAnnotation

      public static boolean containsAnnotation(Class<?> javaClass, Class<? extends Annotation> requiredAnnotation)
      A simple implementation of the org.jboss.weld.resources.spi.AnnotationDiscovery#containsAnnotation(Class, Class) contract. This implementation uses reflection.
      See Also:
      • org.jboss.as.weld.discovery.WeldAnnotationDiscovery
    • containsAnnotations

      public static boolean containsAnnotations(Annotation[] annotations, Class<? extends Annotation> requiredAnnotation)