@Experimental(value=SCHEMAS) public class JavaBeanUtils extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map<org.apache.beam.sdk.schemas.utils.ReflectUtils.ClassWithSchema,SchemaUserTypeCreator> |
CACHED_CREATORS |
Constructor and Description |
---|
JavaBeanUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> SchemaUserTypeCreator |
createConstructorCreator(java.lang.Class<T> clazz,
java.lang.reflect.Constructor<T> constructor,
Schema schema,
java.util.List<FieldValueTypeInformation> types) |
static <T> SchemaUserTypeCreator |
createStaticCreator(java.lang.Class<T> clazz,
java.lang.reflect.Method creator,
Schema schema,
java.util.List<FieldValueTypeInformation> types) |
static SchemaUserTypeCreator |
getConstructorCreator(java.lang.Class clazz,
java.lang.reflect.Constructor constructor,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier) |
static java.util.List<FieldValueTypeInformation> |
getFieldTypes(java.lang.Class<?> clazz,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier) |
static java.util.List<FieldValueGetter> |
getGetters(java.lang.Class<?> clazz,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier)
Return the list of
FieldValueGetter s for a Java Bean class |
static java.util.List<FieldValueSetter> |
getSetters(java.lang.Class<?> clazz,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier)
Return the list of
FieldValueSetter s for a Java Bean class |
static SchemaUserTypeCreator |
getStaticCreator(java.lang.Class clazz,
java.lang.reflect.Method creator,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier) |
static Schema |
schemaFromJavaBeanClass(java.lang.Class<?> clazz,
FieldValueTypeSupplier fieldValueTypeSupplier)
Create a
Schema for a Java Bean class. |
static void |
validateJavaBean(java.util.List<FieldValueTypeInformation> getters,
java.util.List<FieldValueTypeInformation> setters) |
public static final java.util.Map<org.apache.beam.sdk.schemas.utils.ReflectUtils.ClassWithSchema,SchemaUserTypeCreator> CACHED_CREATORS
public static Schema schemaFromJavaBeanClass(java.lang.Class<?> clazz, FieldValueTypeSupplier fieldValueTypeSupplier)
Schema
for a Java Bean class.public static void validateJavaBean(java.util.List<FieldValueTypeInformation> getters, java.util.List<FieldValueTypeInformation> setters)
public static java.util.List<FieldValueTypeInformation> getFieldTypes(java.lang.Class<?> clazz, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier)
public static java.util.List<FieldValueGetter> getGetters(java.lang.Class<?> clazz, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier)
FieldValueGetter
s for a Java Bean class
The returned list is ordered by the order of fields in the schema.
public static java.util.List<FieldValueSetter> getSetters(java.lang.Class<?> clazz, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier)
FieldValueSetter
s for a Java Bean class
The returned list is ordered by the order of fields in the schema.
public static SchemaUserTypeCreator getConstructorCreator(java.lang.Class clazz, java.lang.reflect.Constructor constructor, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier)
public static <T> SchemaUserTypeCreator createConstructorCreator(java.lang.Class<T> clazz, java.lang.reflect.Constructor<T> constructor, Schema schema, java.util.List<FieldValueTypeInformation> types)
public static SchemaUserTypeCreator getStaticCreator(java.lang.Class clazz, java.lang.reflect.Method creator, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier)
public static <T> SchemaUserTypeCreator createStaticCreator(java.lang.Class<T> clazz, java.lang.reflect.Method creator, Schema schema, java.util.List<FieldValueTypeInformation> types)