Class Reflections


  • public final class Reflections
    extends Object
    Neither the class nor its methods are considered a public API and should only be used internally.
    • Method Detail

      • findField

        public static Field findField​(Class<?> clazz,
                                      String fieldName)
        Parameters:
        clazz -
        fieldName -
        Returns:
        the field declared in the class hierarchy
      • findMethod

        public static Method findMethod​(Class<?> clazz,
                                        String methodName,
                                        Class<?>... parameterTypes)
        Parameters:
        clazz -
        methodName -
        parameterTypes -
        Returns:
        the method declared in the class hierarchy
      • findConstructor

        public static Constructor<?> findConstructor​(Class<?> clazz,
                                                     Class<?>... parameterTypes)
      • newInstance

        public static Object newInstance​(Class<?> clazz,
                                         Class<?>[] parameterTypes,
                                         Object[] args)
      • getRawType

        public static <T> Class<T> getRawType​(Type type)