@Internal public class ReflectUtils extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ReflectUtils.ClassWithSchema
Represents a class and a schema.
|
Constructor and Description |
---|
ReflectUtils() |
Modifier and Type | Method and Description |
---|---|
static TypeDescriptor |
boxIfPrimitive(TypeDescriptor typeDescriptor) |
static @Nullable java.lang.reflect.Constructor |
getAnnotatedConstructor(java.lang.Class<?> clazz) |
static @Nullable java.lang.reflect.Method |
getAnnotatedCreateMethod(java.lang.Class<?> clazz) |
static java.util.List<java.lang.reflect.Field> |
getFields(java.lang.Class<?> clazz) |
static @Nullable TypeDescriptor |
getIterableComponentType(TypeDescriptor valueType)
For an array T[] or a subclass of Iterable
|
static TypeDescriptor |
getMapType(TypeDescriptor valueType,
int index) |
static java.util.List<java.lang.reflect.Method> |
getMethods(java.lang.Class<?> clazz)
Returns the list of non private/protected, non-static methods in the class, caching the
results.
|
static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Multimap<java.lang.String,java.lang.reflect.Method> |
getMethodsMap(java.lang.Class<?> clazz) |
static boolean |
isGetter(java.lang.reflect.Method method) |
static boolean |
isSetter(java.lang.reflect.Method method) |
static java.lang.String |
stripGetterPrefix(java.lang.String method) |
static java.lang.String |
stripPrefix(java.lang.String methodName,
java.lang.String prefix) |
static java.lang.String |
stripSetterPrefix(java.lang.String method) |
public static java.util.List<java.lang.reflect.Method> getMethods(java.lang.Class<?> clazz)
public static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Multimap<java.lang.String,java.lang.reflect.Method> getMethodsMap(java.lang.Class<?> clazz)
public static @Nullable java.lang.reflect.Constructor getAnnotatedConstructor(java.lang.Class<?> clazz)
public static @Nullable java.lang.reflect.Method getAnnotatedCreateMethod(java.lang.Class<?> clazz)
public static java.util.List<java.lang.reflect.Field> getFields(java.lang.Class<?> clazz)
public static boolean isGetter(java.lang.reflect.Method method)
public static boolean isSetter(java.lang.reflect.Method method)
public static java.lang.String stripPrefix(java.lang.String methodName, java.lang.String prefix)
public static java.lang.String stripGetterPrefix(java.lang.String method)
public static java.lang.String stripSetterPrefix(java.lang.String method)
public static @Nullable TypeDescriptor getIterableComponentType(TypeDescriptor valueType)
public static TypeDescriptor getMapType(TypeDescriptor valueType, int index)
public static TypeDescriptor boxIfPrimitive(TypeDescriptor typeDescriptor)