public class JavaBeanUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map<ReflectUtils.TypeDescriptorWithSchema<?>,SchemaUserTypeCreator> |
CACHED_CREATORS |
static java.lang.String |
GETTER_WITH_NULL_METHOD_ERROR |
static java.lang.String |
SETTER_WITH_NULL_METHOD_ERROR |
Constructor and Description |
---|
JavaBeanUtils() |
Modifier and Type | Method and Description |
---|---|
static <T,K extends java.lang.Comparable<? super K>> |
comparingNullFirst(java.util.function.Function<? super T,? extends K> keyExtractor) |
static <T> SchemaUserTypeCreator |
createConstructorCreator(java.lang.Class<T> clazz,
java.lang.reflect.Constructor<T> constructor,
Schema schema,
java.util.List<FieldValueTypeInformation> types,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory) |
static <ObjectT,ValueT> |
createGetter(FieldValueTypeInformation typeInformation,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory) |
static <ObjectT,ValueT> |
createSetter(FieldValueTypeInformation typeInformation,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory) |
static <T> SchemaUserTypeCreator |
createStaticCreator(java.lang.Class<T> clazz,
java.lang.reflect.Method creator,
Schema schema,
java.util.List<FieldValueTypeInformation> types,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory) |
static SchemaUserTypeCreator |
getConstructorCreator(TypeDescriptor<?> typeDescriptor,
java.lang.reflect.Constructor constructor,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory) |
static java.util.List<FieldValueTypeInformation> |
getFieldTypes(TypeDescriptor<?> typeDescriptor,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier) |
static <T> java.util.List<FieldValueGetter<T,java.lang.Object>> |
getGetters(TypeDescriptor<T> typeDescriptor,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
Return the list of
FieldValueGetter s for a Java Bean class |
static java.util.List<FieldValueSetter> |
getSetters(TypeDescriptor<?> typeDescriptor,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
Return the list of
FieldValueSetter s for a Java Bean class |
static SchemaUserTypeCreator |
getStaticCreator(TypeDescriptor<?> typeDescriptor,
java.lang.reflect.Method creator,
Schema schema,
FieldValueTypeSupplier fieldValueTypeSupplier,
ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory) |
static Schema |
schemaFromJavaBeanClass(TypeDescriptor<?> typeDescriptor,
FieldValueTypeSupplier fieldValueTypeSupplier)
Create a
Schema for a Java Bean class. |
static void |
validateJavaBean(java.util.List<FieldValueTypeInformation> getters,
java.util.List<FieldValueTypeInformation> setters,
Schema schema) |
public static final java.lang.String GETTER_WITH_NULL_METHOD_ERROR
public static final java.lang.String SETTER_WITH_NULL_METHOD_ERROR
public static final java.util.Map<ReflectUtils.TypeDescriptorWithSchema<?>,SchemaUserTypeCreator> CACHED_CREATORS
public static Schema schemaFromJavaBeanClass(TypeDescriptor<?> typeDescriptor, FieldValueTypeSupplier fieldValueTypeSupplier)
Schema
for a Java Bean class.public static void validateJavaBean(java.util.List<FieldValueTypeInformation> getters, java.util.List<FieldValueTypeInformation> setters, Schema schema)
public static java.util.List<FieldValueTypeInformation> getFieldTypes(TypeDescriptor<?> typeDescriptor, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier)
public static <T> java.util.List<FieldValueGetter<T,java.lang.Object>> getGetters(TypeDescriptor<T> typeDescriptor, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
FieldValueGetter
s for a Java Bean class
The returned list is ordered by the order of fields in the schema.
public static <ObjectT,ValueT> FieldValueGetter<ObjectT,ValueT> createGetter(FieldValueTypeInformation typeInformation, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
public static java.util.List<FieldValueSetter> getSetters(TypeDescriptor<?> typeDescriptor, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
FieldValueSetter
s for a Java Bean class
The returned list is ordered by the order of fields in the schema.
public static <ObjectT,ValueT> FieldValueSetter<ObjectT,ValueT> createSetter(FieldValueTypeInformation typeInformation, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
public static SchemaUserTypeCreator getConstructorCreator(TypeDescriptor<?> typeDescriptor, java.lang.reflect.Constructor constructor, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
public static <T> SchemaUserTypeCreator createConstructorCreator(java.lang.Class<T> clazz, java.lang.reflect.Constructor<T> constructor, Schema schema, java.util.List<FieldValueTypeInformation> types, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
public static SchemaUserTypeCreator getStaticCreator(TypeDescriptor<?> typeDescriptor, java.lang.reflect.Method creator, Schema schema, FieldValueTypeSupplier fieldValueTypeSupplier, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
public static <T> SchemaUserTypeCreator createStaticCreator(java.lang.Class<T> clazz, java.lang.reflect.Method creator, Schema schema, java.util.List<FieldValueTypeInformation> types, ByteBuddyUtils.TypeConversionsFactory typeConversionsFactory)
public static <T,K extends java.lang.Comparable<? super K>> java.util.Comparator<T> comparingNullFirst(java.util.function.Function<? super T,? extends K> keyExtractor)