Package io.airlift.drift.codec.metadata
Class ReflectionHelper
java.lang.Object
io.airlift.drift.codec.metadata.ReflectionHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractFieldName(Method method) static StringextractFieldName(String methodName) extractParameterNames(Executable methodOrConstructor) static Collection<Field>findAnnotatedFields(Class<?> type, Class<? extends Annotation> annotation) static MethodfindAnnotatedMethod(Class<?> configClass, Class<? extends Annotation> annotation, String methodName, Class<?>... paramTypes) static Collection<Method>findAnnotatedMethods(Class<?> type, Class<? extends Annotation> annotation) Find methods that are tagged with a given annotation somewhere in the hierarchygetAllDeclaredFields(Class<?> type) getAllDeclaredMethods(Class<?> type) static Class<?>getArrayOfType(Type componentType) static <T extends Annotation>
Set<T>getEffectiveClassAnnotations(Class<?> type, Class<T> annotation) static TypegetFutureReturnType(Type type) static TypegetIterableType(Type type) static TypegetMapKeyType(Type type) static TypegetMapValueType(Type type) static TypegetOptionalType(Type type) static booleanstatic booleanisOptional(Type type) static TyperesolveFieldType(Type structType, Type genericType) static Type[]resolveFieldTypes(Type structType, Type[] genericTypes)
-
Method Details
-
isArray
-
isOptional
-
getArrayOfType
-
getMapKeyType
-
getMapValueType
-
getIterableType
-
getOptionalType
-
getFutureReturnType
-
getEffectiveClassAnnotations
public static <T extends Annotation> Set<T> getEffectiveClassAnnotations(Class<?> type, Class<T> annotation) -
getAllDeclaredMethods
-
getAllDeclaredFields
-
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
-
findAnnotatedFields
public static Collection<Field> findAnnotatedFields(Class<?> type, Class<? extends Annotation> annotation) -
extractParameterNames
-
extractFieldName
-
extractFieldName
-
resolveFieldType
-
resolveFieldTypes
-