Class Reflection

java.lang.Object
com.pholser.junit.quickcheck.internal.Reflection

public final class Reflection extends Object
  • Field Details

    • PRIMITIVES

      private static final Map<Class<?>,Class<?>> PRIMITIVES
  • Constructor Details

    • Reflection

      private Reflection()
  • Method Details

    • maybeWrap

      public static Class<?> maybeWrap(Class<?> clazz)
    • findConstructor

      public static <T> Constructor<T> findConstructor(Class<T> type, Class<?>... parameterTypes)
    • findDeclaredConstructor

      static <T> Constructor<T> findDeclaredConstructor(Class<T> type, Class<?>... parameterTypes)
    • singleAccessibleConstructor

      public static <T> Constructor<T> singleAccessibleConstructor(Class<T> type)
    • instantiate

      public static <T> T instantiate(Class<T> clazz)
    • instantiate

      public static <T> T instantiate(Constructor<T> ctor, Object... args)
    • supertypes

      public static Set<io.arxila.javaruntype.type.Type<?>> supertypes(io.arxila.javaruntype.type.Type<?> bottom)
    • defaultValueOf

      public static Object defaultValueOf(Class<? extends Annotation> annotationType, String attribute)
    • allAnnotations

      public static List<Annotation> allAnnotations(AnnotatedElement e)
    • allAnnotationsByType

      static <T extends Annotation> List<T> allAnnotationsByType(AnnotatedElement e, Class<T> type)
    • findMethod

      public static Method findMethod(Class<?> target, String methodName, Class<?>... argTypes)
    • invoke

      public static Object invoke(Method method, Object target, Object... args)
    • findField

      public static Field findField(Class<?> type, String fieldName)
    • allDeclaredFieldsOf

      public static List<Field> allDeclaredFieldsOf(Class<?> type)
    • setField

      public static void setField(Field field, Object target, Object value, boolean suppressProtection)
    • jdk9OrBetter

      static boolean jdk9OrBetter()
    • singleAbstractMethodOf

      public static Method singleAbstractMethodOf(Class<?> rawClass)
    • isMarkerInterface

      public static boolean isMarkerInterface(Class<?> clazz)
    • overridesJavaLangObjectMethod

      private static boolean overridesJavaLangObjectMethod(Method method)
    • isEquals

      private static boolean isEquals(Method method)
    • isHashCode

      private static boolean isHashCode(Method method)
    • isToString

      private static boolean isToString(Method method)
    • reflectionException

      public static RuntimeException reflectionException(Exception ex)
    • nonSystemAnnotations

      private static List<Annotation> nonSystemAnnotations(AnnotatedElement e)
    • annotatedComponentTypes

      public static List<AnnotatedType> annotatedComponentTypes(AnnotatedType annotatedType)