Class ReflectionHelper

java.lang.Object
io.airlift.drift.codec.metadata.ReflectionHelper

public final class ReflectionHelper extends Object
  • Method Details

    • isArray

      public static boolean isArray(Type type)
    • isOptional

      public static boolean isOptional(Type type)
    • getArrayOfType

      public static Class<?> getArrayOfType(Type componentType)
    • getMapKeyType

      public static Type getMapKeyType(Type type)
    • getMapValueType

      public static Type getMapValueType(Type type)
    • getIterableType

      public static Type getIterableType(Type type)
    • getOptionalType

      public static Type getOptionalType(Type type)
    • getFutureReturnType

      public static Type getFutureReturnType(Type type)
    • getEffectiveClassAnnotations

      public static <T extends Annotation> Set<T> getEffectiveClassAnnotations(Class<?> type, Class<T> annotation)
    • getAllDeclaredMethods

      public static Iterable<Method> getAllDeclaredMethods(Class<?> type)
    • getAllDeclaredFields

      public static Iterable<Field> getAllDeclaredFields(Class<?> type)
    • findAnnotatedMethods

      public static Collection<Method> findAnnotatedMethods(Class<?> type, Class<? extends Annotation> annotation)
      Find methods that are tagged with a given annotation somewhere in the hierarchy
    • findAnnotatedMethod

      public static Method findAnnotatedMethod(Class<?> configClass, Class<? extends Annotation> annotation, String methodName, Class<?>... paramTypes)
    • findAnnotatedFields

      public static Collection<Field> findAnnotatedFields(Class<?> type, Class<? extends Annotation> annotation)
    • extractParameterNames

      public static List<String> extractParameterNames(Executable methodOrConstructor)
    • extractFieldName

      public static String extractFieldName(Method method)
    • extractFieldName

      public static String extractFieldName(String methodName)
    • resolveFieldType

      public static Type resolveFieldType(Type structType, Type genericType)
    • resolveFieldTypes

      public static Type[] resolveFieldTypes(Type structType, Type[] genericTypes)