public class ReflectUtils extends Object
  • Constructor Details

    • ReflectUtils

      public ReflectUtils()
  • Method Details

    • assertIsAnnotated

      public static void assertIsAnnotated(Method method, Class<? extends Annotation> annoClass)
    • assertIsPublicNonStatic

      public static void assertIsPublicNonStatic(Method method)
    • assertIsReturn

      public static void assertIsReturn(Method method, Class<?> type)
    • findMethod

      public static Method findMethod(Class<?> pojo, String methodName, Class<?>... params)
    • findAnnotatedMethod

      public static Method findAnnotatedMethod(Class<?> pojo, Class<? extends Annotation> anno)
    • findAnnotatedMethods

      public static Method[] findAnnotatedMethods(Class<?> pojo, Class<? extends Annotation> anno)
    • findGenericClassFor

      public static Class<?> findGenericClassFor(Class<?> baseClass, Class<?> ifaceClass)
      Given a Base (concrete) Class, find the interface specified, and return its concrete Generic class declaration.
      baseClass - the base (concrete) class to look in
      ifaceClass - the interface of interest
      the (concrete) generic class that the interface exposes
    • isDefaultConstructable

      public static boolean isDefaultConstructable(Class<?> clazz)
    • isSameParameters

      public static boolean isSameParameters(Class<?>[] actual, Class<?>[] params)
    • toShortName

      public static String toShortName(Type type)
    • toString

      public static String toString(Class<?> pojo, Method method)
    • trimClassName

      public static String trimClassName(String name)
    • append

      public static void append(StringBuilder str, Class<?> pojo, Method method)
    • append

      public static void append(StringBuilder str, Method method)
    • append

      public static void append(StringBuilder str, MethodType methodType)