Class ReflectUtils
java.lang.Object
org.apache.beam.sdk.schemas.utils.ReflectUtils
A set of reflection helper methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents a class and a schema.static class
Represents a type descriptor and a schema. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeDescriptor
boxIfPrimitive
(TypeDescriptor typeDescriptor) static @Nullable Constructor
getAnnotatedConstructor
(Class<?> clazz) getAnnotatedCreateMethod
(Class<?> clazz) static @Nullable TypeDescriptor
getIterableComponentType
(TypeDescriptor valueType) For an array T[] or a subclass of Iterable, return a TypeDescriptor describing T. static TypeDescriptor
getMapType
(TypeDescriptor valueType, int index) getMethods
(Class<?> clazz) Returns the list of non private/protected, non-static methods in the class, caching the results.getMethodsMap
(Class<?> clazz) static boolean
static boolean
static String
stripGetterPrefix
(String method) static String
stripPrefix
(String methodName, String prefix) static String
stripSetterPrefix
(String method)
-
Constructor Details
-
ReflectUtils
public ReflectUtils()
-
-
Method Details
-
getMethods
Returns the list of non private/protected, non-static methods in the class, caching the results. -
getMethodsMap
-
getAnnotatedConstructor
-
getAnnotatedCreateMethod
-
getFields
-
isGetter
-
isSetter
-
stripPrefix
-
stripGetterPrefix
-
stripSetterPrefix
-
getIterableComponentType
For an array T[] or a subclass of Iterable, return a TypeDescriptor describing T. -
getMapType
-
boxIfPrimitive
-