public class ObjectReaderCreator
extends java.lang.Object
This class supports various features including:
Example usage:
// Get default creator
ObjectReaderCreator creator = JSONFactory.getDefaultObjectReaderCreator();
// Create ObjectReader for a class
ObjectReader<User> reader = creator.createObjectReader(User.class);
// Create FieldReader for a field
Field field = User.class.getDeclaredField("name");
FieldReader<User> fieldReader = creator.createFieldReader("name", String.class, field);
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ObjectReaderCreator.LambdaSetterInfo |
| Modifier and Type | Field and Description |
|---|---|
static ObjectReaderCreator |
INSTANCE |
static boolean |
JIT |
protected java.util.concurrent.atomic.AtomicInteger |
jitErrorCount |
protected java.lang.Throwable |
jitErrorLast |
protected static java.util.Map<java.lang.Class,ObjectReaderCreator.LambdaSetterInfo> |
methodTypeMapping |
| Constructor and Description |
|---|
ObjectReaderCreator() |
| Modifier and Type | Method and Description |
|---|---|
<T,R> java.util.function.Function<T,R> |
createBuildFunction(java.lang.reflect.Method builderMethod)
Creates a Function that can build objects using the specified builder method.
|
(package private) <T,R> java.util.function.Function<T,R> |
createBuildFunctionLambda(java.lang.reflect.Method builderMethod)
Creates a Function that can build objects using the specified builder method with lambda optimization.
|
java.util.function.Function<java.util.function.Consumer,ByteArrayValueConsumer> |
createByteArrayValueConsumerCreator(java.lang.Class objectClass,
FieldReader[] fieldReaderArray) |
java.util.function.Function<java.util.function.Consumer,CharArrayValueConsumer> |
createCharArrayValueConsumerCreator(java.lang.Class objectClass,
FieldReader[] fieldReaderArray) |
protected ObjectReader |
createEnumReader(java.lang.Class objectClass,
java.lang.reflect.Method createMethod,
ObjectReaderProvider provider) |
<T> java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> |
createFactoryFunction(java.lang.reflect.Method factoryMethod,
java.lang.String... paramNames)
Creates a Function that can instantiate objects using the specified factory method and parameter names.
|
<T> FieldReader |
createFieldReader(java.lang.Class<T> objectType,
java.lang.String fieldName,
java.lang.String format,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Method method)
Creates a FieldReader for the specified field with format configuration.
|
<T> FieldReader |
createFieldReader(java.lang.Class<T> objectType,
java.lang.String fieldName,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Method method)
Creates a FieldReader for the specified field with default configuration.
|
<T> FieldReader<T> |
createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
java.lang.String schema,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Field field,
ObjectReader initReader) |
<T> FieldReader<T> |
createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
java.lang.String schema,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Field field,
ObjectReader initReader,
java.lang.String keyName,
java.util.function.BiConsumer arrayToMapDuplicateHandler) |
<T> FieldReader<T> |
createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
long features,
java.lang.String format,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Field field) |
protected void |
createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String namingStrategy,
java.lang.String[] orders,
BeanInfo beanInfo,
FieldInfo fieldInfo,
java.lang.reflect.Method method,
java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders,
ObjectReaderProvider provider) |
protected void |
createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String namingStrategy,
java.lang.String[] orders,
FieldInfo fieldInfo,
java.lang.reflect.Field field,
java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders,
ObjectReaderProvider provider) |
<T,V> FieldReader |
createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
java.lang.reflect.Type fieldType,
java.lang.Class<V> fieldClass,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
JSONSchema schema,
java.lang.reflect.Method method,
java.util.function.BiConsumer<T,V> function,
ObjectReader initReader) |
<T> FieldReader<T> |
createFieldReader(java.lang.String fieldName,
java.lang.reflect.Field field) |
<T> FieldReader |
createFieldReader(java.lang.String fieldName,
java.lang.reflect.Method method)
Creates a FieldReader for the specified method with minimal configuration.
|
<T> FieldReader<T> |
createFieldReader(java.lang.String fieldName,
java.lang.String format,
java.lang.reflect.Type fieldType,
java.lang.reflect.Field field) |
<T,V> FieldReader |
createFieldReader(java.lang.String fieldName,
java.lang.reflect.Type fieldType,
java.lang.Class<V> fieldClass,
long features,
java.util.function.BiConsumer<T,V> function) |
<T,V> FieldReader |
createFieldReader(java.lang.String fieldName,
java.lang.reflect.Type fieldType,
java.lang.Class<V> fieldClass,
java.lang.reflect.Method method,
java.util.function.BiConsumer<T,V> function) |
<T> FieldReader<T> |
createFieldReader(java.lang.String fieldName,
java.lang.reflect.Type fieldType,
java.lang.reflect.Field field) |
protected <T> FieldReader |
createFieldReaderLambda(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
java.lang.String schema,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Method method,
ObjectReader initReader)
Creates a FieldReader using lambda expressions for improved performance.
|
<T> FieldReader |
createFieldReaderMethod(java.lang.Class<T> objectType,
java.lang.String fieldName,
java.lang.String format,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Method method)
Creates a FieldReader for the specified method with default configuration.
|
<T> FieldReader |
createFieldReaderMethod(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
java.lang.String schema,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Method method,
ObjectReader initReader)
Creates a FieldReader for the specified method with comprehensive configuration.
|
<T> FieldReader |
createFieldReaderMethod(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
java.lang.String schema,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.reflect.Method method,
ObjectReader initReader,
java.lang.String keyName,
java.util.function.BiConsumer arrayToMapDuplicateHandler)
Creates a FieldReader for the specified method with comprehensive configuration including array-to-map options.
|
<T> FieldReader |
createFieldReaderParam(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.util.Locale locale,
java.lang.Object defaultValue,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.String paramName,
java.lang.Class declaringClass,
java.lang.reflect.Parameter parameter,
JSONSchema schema,
ObjectReader initReader)
Creates a FieldReader for the specified parameter with comprehensive configuration.
|
<T> FieldReader |
createFieldReaderParam(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.String paramName,
java.lang.Class declaringClass,
java.lang.reflect.Parameter parameter,
JSONSchema schema)
Creates a FieldReader for the specified parameter with default configuration.
|
<T> FieldReader |
createFieldReaderParam(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
java.lang.String fieldName,
int ordinal,
long features,
java.lang.String format,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
java.lang.String paramName,
java.lang.Class declaringClass,
java.lang.reflect.Parameter parameter,
JSONSchema schema,
ObjectReader initReader)
Creates a FieldReader for the specified parameter with initialization reader.
|
<T> FieldReader[] |
createFieldReaders(java.lang.Class<T> objectClass) |
<T> FieldReader[] |
createFieldReaders(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType) |
protected <T> FieldReader[] |
createFieldReaders(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
BeanInfo beanInfo,
boolean fieldBased,
ObjectReaderProvider provider) |
FieldReader[] |
createFieldReaders(ObjectReaderProvider provider,
java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.reflect.Executable owner,
java.lang.reflect.Parameter[] parameters,
java.lang.String... paramNames) |
<T> java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> |
createFunction(java.lang.reflect.Constructor constructor,
java.lang.reflect.Constructor markerConstructor,
java.lang.String... paramNames)
Creates a Function that can instantiate objects using the specified constructor, marker constructor, and parameter names.
|
<T> java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> |
createFunction(java.lang.reflect.Constructor constructor,
java.lang.String... paramNames)
Creates a Function that can instantiate objects using the specified constructor and parameter names.
|
protected <T> java.util.function.IntFunction<T> |
createIntFunction(java.lang.reflect.Constructor constructor) |
protected <T> java.util.function.IntFunction<T> |
createIntFunction(java.lang.reflect.Method factoryMethod) |
protected <T> ObjectReaderNoneDefaultConstructor |
createNoneDefaultConstructorObjectReader(java.lang.Class objectClass,
BeanInfo beanInfo,
java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> constructorFunction,
java.util.List<java.lang.reflect.Constructor> alternateConstructors,
java.lang.String[] parameterNames,
FieldReader[] paramFieldReaders,
FieldReader[] fieldReaderArray) |
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectType) |
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectType,
boolean fieldBased) |
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectClass,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with the given field readers.
|
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectClass,
long features,
java.util.function.Supplier<T> defaultCreator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with comprehensive configuration.
|
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectClass,
java.lang.String typeKey,
long features,
JSONSchema schema,
java.util.function.Supplier<T> defaultCreator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with type key, features, schema, and comprehensive configuration.
|
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectClass,
java.lang.String typeKey,
java.lang.String rootName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> defaultCreator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with comprehensive configuration including root name.
|
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectClass,
java.util.function.Supplier<T> defaultCreator,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with a default creator and field readers.
|
<T> ObjectReader<T> |
createObjectReader(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
boolean fieldBased,
ObjectReaderProvider provider) |
<T> ObjectReader<T> |
createObjectReader(java.lang.reflect.Type objectType) |
<T> ObjectReader<T> |
createObjectReaderFactoryMethod(java.lang.reflect.Method factoryMethod,
java.lang.String... paramNames) |
<T> ObjectReader<T> |
createObjectReaderNoneDefaultConstructor(java.lang.Class objectClass,
java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> creator,
FieldReader... fieldReaders) |
<T> ObjectReader<T> |
createObjectReaderNoneDefaultConstructor(java.lang.reflect.Constructor constructor,
java.lang.String... paramNames) |
<T> ObjectReader<T> |
createObjectReaderSeeAlso(java.lang.Class<T> objectType,
java.lang.Class[] seeAlso,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with see-also support.
|
<T> ObjectReader<T> |
createObjectReaderSeeAlso(java.lang.Class<T> objectClass,
java.lang.String typeKey,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
java.lang.Class seeAlsoDefault,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with see-also support, custom type key, and default class.
|
<T> ObjectReader<T> |
createObjectReaderSeeAlso(java.lang.Class<T> objectClass,
java.lang.String typeKey,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with see-also support and custom type key.
|
<T> ObjectReader<T> |
createObjectReaderSeeAlso(java.lang.Class<T> objectType,
java.util.function.Supplier<T> defaultCreator,
java.lang.String typeKey,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
FieldReader... fieldReaders)
Creates an ObjectReader for the specified object type with see-also support, custom creator, and type key.
|
protected <T> ObjectReader<T> |
createObjectReaderWithBuilder(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
ObjectReaderProvider provider,
BeanInfo beanInfo) |
protected <T> ObjectReader<T> |
createObjectReaderWithCreator(java.lang.Class<T> objectClass,
java.lang.reflect.Type objectType,
ObjectReaderProvider provider,
BeanInfo beanInfo) |
protected <T> java.util.function.Function<java.lang.String,T> |
createStringFunction(java.lang.reflect.Constructor constructor) |
protected <T> java.util.function.Function<java.lang.String,T> |
createStringFunction(java.lang.reflect.Method factoryMethod) |
<T> java.util.function.Supplier<T> |
createSupplier(java.lang.Class<T> objectClass)
Creates a Supplier function for the specified object class that can create new instances.
|
<T> java.util.function.Supplier<T> |
createSupplier(java.lang.reflect.Constructor<T> constructor)
Creates a Supplier function for the specified constructor that can create new instances.
|
<T> java.util.function.Supplier<T> |
createSupplier(java.lang.reflect.Constructor constructor,
boolean jit)
Creates a Supplier function for the specified constructor with JIT compilation option.
|
protected <I,T> java.util.function.Function<I,T> |
createValueFunction(java.lang.reflect.Constructor<T> constructor,
java.lang.Class<I> valueClass) |
protected <I,T> java.util.function.Function<I,T> |
createValueFunction(java.lang.reflect.Method factoryMethod,
java.lang.Class valueClass) |
(package private) static ObjectReader |
getInitReader(ObjectReaderProvider provider,
java.lang.reflect.Type fieldType,
java.lang.Class fieldClass,
FieldInfo fieldInfo) |
protected java.lang.Object |
lambdaSetter(java.lang.Class objectClass,
java.lang.Class fieldClass,
java.lang.reflect.Method method) |
private java.util.List<FieldReader> |
listOf(FieldReader fieldReader) |
private void |
putIfAbsent(java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders,
java.lang.String fieldName,
FieldReader fieldReader,
java.lang.Class objectClass) |
private FieldReader[] |
toFieldReaderArray(java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders) |
public static final boolean JIT
public static final ObjectReaderCreator INSTANCE
protected final java.util.concurrent.atomic.AtomicInteger jitErrorCount
protected volatile java.lang.Throwable jitErrorLast
protected static final java.util.Map<java.lang.Class,ObjectReaderCreator.LambdaSetterInfo> methodTypeMapping
public <T> ObjectReader<T> createObjectReaderNoneDefaultConstructor(java.lang.reflect.Constructor constructor, java.lang.String... paramNames)
public <T> ObjectReader<T> createObjectReaderNoneDefaultConstructor(java.lang.Class objectClass, java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> creator, FieldReader... fieldReaders)
public <T> ObjectReader<T> createObjectReaderFactoryMethod(java.lang.reflect.Method factoryMethod, java.lang.String... paramNames)
public FieldReader[] createFieldReaders(ObjectReaderProvider provider, java.lang.Class objectClass, java.lang.reflect.Type objectType, java.lang.reflect.Executable owner, java.lang.reflect.Parameter[] parameters, java.lang.String... paramNames)
public <T> java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> createFactoryFunction(java.lang.reflect.Method factoryMethod,
java.lang.String... paramNames)
T - the type of objects that the Function can createfactoryMethod - the factory method to use for creating instancesparamNames - the parameter names to use for the factory methodpublic <T> java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> createFunction(java.lang.reflect.Constructor constructor,
java.lang.String... paramNames)
T - the type of objects that the Function can createconstructor - the constructor to use for creating instancesparamNames - the parameter names to use for the constructorpublic <T> java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> createFunction(java.lang.reflect.Constructor constructor,
java.lang.reflect.Constructor markerConstructor,
java.lang.String... paramNames)
T - the type of objects that the Function can createconstructor - the constructor to use for creating instancesmarkerConstructor - the marker constructor to useparamNames - the parameter names to use for the constructorpublic <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectClass, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializefieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectClass, java.util.function.Supplier<T> defaultCreator, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializedefaultCreator - the supplier function to create new instances of the objectfieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReaderSeeAlso(java.lang.Class<T> objectType, java.lang.Class[] seeAlso, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectType - the class of objects to deserializeseeAlso - the see-also classesfieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReaderSeeAlso(java.lang.Class<T> objectClass, java.lang.String typeKey, java.lang.Class[] seeAlso, java.lang.String[] seeAlsoNames, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializetypeKey - the type key to useseeAlso - the see-also classesseeAlsoNames - the see-also class namesfieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReaderSeeAlso(java.lang.Class<T> objectClass, java.lang.String typeKey, java.lang.Class[] seeAlso, java.lang.String[] seeAlsoNames, java.lang.Class seeAlsoDefault, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializetypeKey - the type key to useseeAlso - the see-also classesseeAlsoNames - the see-also class namesseeAlsoDefault - the default see-also classfieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReaderSeeAlso(java.lang.Class<T> objectType, java.util.function.Supplier<T> defaultCreator, java.lang.String typeKey, java.lang.Class[] seeAlso, java.lang.String[] seeAlsoNames, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectType - the class of objects to deserializedefaultCreator - the supplier function to create new instances of the objecttypeKey - the type key to useseeAlso - the see-also classesseeAlsoNames - the see-also class namesfieldReaders - the field readers to use for deserializationprotected <T> ObjectReader<T> createObjectReaderWithBuilder(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, ObjectReaderProvider provider, BeanInfo beanInfo)
protected <T> ObjectReader<T> createObjectReaderWithCreator(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, ObjectReaderProvider provider, BeanInfo beanInfo)
public <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectClass, long features, java.util.function.Supplier<T> defaultCreator, java.util.function.Function buildFunction, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializefeatures - the features to use for deserializationdefaultCreator - the supplier function to create new instances of the objectbuildFunction - the build function to usefieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectClass, java.lang.String typeKey, long features, JSONSchema schema, java.util.function.Supplier<T> defaultCreator, java.util.function.Function buildFunction, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializetypeKey - the type key to usefeatures - the features to use for deserializationschema - the JSON schema to usedefaultCreator - the supplier function to create new instances of the objectbuildFunction - the build function to usefieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectClass, java.lang.String typeKey, java.lang.String rootName, long features, JSONSchema schema, java.util.function.Supplier<T> defaultCreator, java.util.function.Function buildFunction, FieldReader... fieldReaders)
T - the type of objects that the ObjectReader can deserializeobjectClass - the class of objects to deserializetypeKey - the type key to userootName - the root name to usefeatures - the features to use for deserializationschema - the JSON schema to usedefaultCreator - the supplier function to create new instances of the objectbuildFunction - the build function to usefieldReaders - the field readers to use for deserializationpublic <T> ObjectReader<T> createObjectReader(java.lang.reflect.Type objectType)
public <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectType)
public <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectType, boolean fieldBased)
public <T> ObjectReader<T> createObjectReader(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, boolean fieldBased, ObjectReaderProvider provider)
protected <T> ObjectReaderNoneDefaultConstructor createNoneDefaultConstructorObjectReader(java.lang.Class objectClass, BeanInfo beanInfo, java.util.function.Function<java.util.Map<java.lang.Long,java.lang.Object>,T> constructorFunction, java.util.List<java.lang.reflect.Constructor> alternateConstructors, java.lang.String[] parameterNames, FieldReader[] paramFieldReaders, FieldReader[] fieldReaderArray)
public <T> FieldReader[] createFieldReaders(java.lang.Class<T> objectClass)
public <T> FieldReader[] createFieldReaders(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType)
protected void createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String namingStrategy,
java.lang.String[] orders,
FieldInfo fieldInfo,
java.lang.reflect.Field field,
java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders,
ObjectReaderProvider provider)
protected void createFieldReader(java.lang.Class objectClass,
java.lang.reflect.Type objectType,
java.lang.String namingStrategy,
java.lang.String[] orders,
BeanInfo beanInfo,
FieldInfo fieldInfo,
java.lang.reflect.Method method,
java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders,
ObjectReaderProvider provider)
protected <T> FieldReader[] createFieldReaders(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, BeanInfo beanInfo, boolean fieldBased, ObjectReaderProvider provider)
public <T> java.util.function.Supplier<T> createSupplier(java.lang.Class<T> objectClass)
T - the type of objects that the Supplier can createobjectClass - the class of objects to createpublic <T> java.util.function.Supplier<T> createSupplier(java.lang.reflect.Constructor<T> constructor)
T - the type of objects that the Supplier can createconstructor - the constructor to use for creating instancespublic <T> java.util.function.Supplier<T> createSupplier(java.lang.reflect.Constructor constructor,
boolean jit)
T - the type of objects that the Supplier can createconstructor - the constructor to use for creating instancesjit - whether to use JIT compilation for improved performanceprotected <T> java.util.function.IntFunction<T> createIntFunction(java.lang.reflect.Constructor constructor)
protected <T> java.util.function.IntFunction<T> createIntFunction(java.lang.reflect.Method factoryMethod)
protected <T> java.util.function.Function<java.lang.String,T> createStringFunction(java.lang.reflect.Constructor constructor)
protected <T> java.util.function.Function<java.lang.String,T> createStringFunction(java.lang.reflect.Method factoryMethod)
protected <I,T> java.util.function.Function<I,T> createValueFunction(java.lang.reflect.Constructor<T> constructor,
java.lang.Class<I> valueClass)
protected <I,T> java.util.function.Function<I,T> createValueFunction(java.lang.reflect.Method factoryMethod,
java.lang.Class valueClass)
public <T,R> java.util.function.Function<T,R> createBuildFunction(java.lang.reflect.Method builderMethod)
T - the type of objects that the Function can buildR - the return type of the builder methodbuilderMethod - the builder method to use for building objects<T,R> java.util.function.Function<T,R> createBuildFunctionLambda(java.lang.reflect.Method builderMethod)
T - the type of objects that the Function can buildR - the return type of the builder methodbuilderMethod - the builder method to use for building objectsjava.lang.Throwable - if an error occurs during lambda creationpublic <T> FieldReader createFieldReader(java.lang.Class<T> objectType, java.lang.String fieldName, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Method method)
T - the type of objects that contain the fieldobjectType - the class containing the fieldfieldName - the name of the fieldfieldType - the type of the fieldfieldClass - the class of the fieldmethod - the method to use for reading the fieldpublic <T> FieldReader createFieldReader(java.lang.Class<T> objectType, java.lang.String fieldName, java.lang.String format, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Method method)
T - the type of objects that contain the fieldobjectType - the class containing the fieldfieldName - the name of the fieldformat - the date format to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldmethod - the method to use for reading the fieldpublic <T> FieldReader createFieldReaderMethod(java.lang.Class<T> objectType, java.lang.String fieldName, java.lang.String format, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Method method)
T - the type of objects that contain the fieldobjectType - the class containing the fieldfieldName - the name of the fieldformat - the date format to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldmethod - the method to use for reading the fieldpublic <T> FieldReader createFieldReaderParam(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.String paramName, java.lang.Class declaringClass, java.lang.reflect.Parameter parameter, JSONSchema schema)
T - the type of objects that contain the fieldobjectClass - the class containing the fieldobjectType - the type of the objectfieldName - the name of the fieldordinal - the ordinal position of the fieldfeatures - the features to use for the fieldformat - the date format to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldparamName - the name of the parameterdeclaringClass - the declaring class of the parameterparameter - the parameter to create a reader forschema - the JSON schema to usepublic <T> FieldReader createFieldReaderParam(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.String paramName, java.lang.Class declaringClass, java.lang.reflect.Parameter parameter, JSONSchema schema, ObjectReader initReader)
T - the type of objects that contain the fieldobjectClass - the class containing the fieldobjectType - the type of the objectfieldName - the name of the fieldordinal - the ordinal position of the fieldfeatures - the features to use for the fieldformat - the date format to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldparamName - the name of the parameterdeclaringClass - the declaring class of the parameterparameter - the parameter to create a reader forschema - the JSON schema to useinitReader - the initialization reader to usepublic <T> FieldReader createFieldReaderParam(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.String paramName, java.lang.Class declaringClass, java.lang.reflect.Parameter parameter, JSONSchema schema, ObjectReader initReader)
T - the type of objects that contain the fieldobjectClass - the class containing the fieldobjectType - the type of the objectfieldName - the name of the fieldordinal - the ordinal position of the fieldfeatures - the features to use for the fieldformat - the date format to use for the fieldlocale - the locale to use for the fielddefaultValue - the default value for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldparamName - the name of the parameterdeclaringClass - the declaring class of the parameterparameter - the parameter to create a reader forschema - the JSON schema to use for the fieldinitReader - the initialization reader to usepublic <T> FieldReader createFieldReaderMethod(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, java.lang.String schema, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Method method, ObjectReader initReader)
T - the type of objects that contain the fieldobjectClass - the class containing the fieldobjectType - the type of the objectfieldName - the name of the fieldordinal - the ordinal position of the fieldfeatures - the features to use for the fieldformat - the date format to use for the fieldlocale - the locale to use for the fielddefaultValue - the default value for the fieldschema - the schema to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldmethod - the method to use for reading the fieldinitReader - the initialization reader to usepublic <T> FieldReader createFieldReaderMethod(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, java.lang.String schema, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Method method, ObjectReader initReader, java.lang.String keyName, java.util.function.BiConsumer arrayToMapDuplicateHandler)
T - the type of objects that contain the fieldobjectClass - the class containing the fieldobjectType - the type of the objectfieldName - the name of the fieldordinal - the ordinal position of the fieldfeatures - the features to use for the fieldformat - the date format to use for the fieldlocale - the locale to use for the fielddefaultValue - the default value for the fieldschema - the schema to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldmethod - the method to use for reading the fieldinitReader - the initialization reader to usekeyName - the key name for array-to-map conversionarrayToMapDuplicateHandler - the duplicate handler for array-to-map conversionpublic <T> FieldReader<T> createFieldReader(java.lang.String fieldName, java.lang.reflect.Type fieldType, java.lang.reflect.Field field)
public <T> FieldReader<T> createFieldReader(java.lang.String fieldName, java.lang.reflect.Field field)
public <T> FieldReader createFieldReader(java.lang.String fieldName, java.lang.reflect.Method method)
T - the type of objects that the FieldReader can deserializefieldName - the name of the fieldmethod - the method to create a reader forJSONException - if the method has an illegal number of parameterspublic <T> FieldReader<T> createFieldReader(java.lang.String fieldName, java.lang.String format, java.lang.reflect.Type fieldType, java.lang.reflect.Field field)
public <T> FieldReader<T> createFieldReader(java.lang.Class objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, long features, java.lang.String format, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Field field)
public <T> FieldReader<T> createFieldReader(java.lang.Class objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, java.lang.String schema, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Field field, ObjectReader initReader)
public <T> FieldReader<T> createFieldReader(java.lang.Class objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, java.lang.String schema, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Field field, ObjectReader initReader, java.lang.String keyName, java.util.function.BiConsumer arrayToMapDuplicateHandler)
public <T,V> FieldReader createFieldReader(java.lang.String fieldName, java.lang.reflect.Type fieldType, java.lang.Class<V> fieldClass, long features, java.util.function.BiConsumer<T,V> function)
public <T,V> FieldReader createFieldReader(java.lang.String fieldName, java.lang.reflect.Type fieldType, java.lang.Class<V> fieldClass, java.lang.reflect.Method method, java.util.function.BiConsumer<T,V> function)
public <T,V> FieldReader createFieldReader(java.lang.Class objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, java.lang.reflect.Type fieldType, java.lang.Class<V> fieldClass, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, JSONSchema schema, java.lang.reflect.Method method, java.util.function.BiConsumer<T,V> function, ObjectReader initReader)
protected ObjectReader createEnumReader(java.lang.Class objectClass, java.lang.reflect.Method createMethod, ObjectReaderProvider provider)
static ObjectReader getInitReader(ObjectReaderProvider provider, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, FieldInfo fieldInfo)
protected <T> FieldReader createFieldReaderLambda(java.lang.Class<T> objectClass, java.lang.reflect.Type objectType, java.lang.String fieldName, int ordinal, long features, java.lang.String format, java.util.Locale locale, java.lang.Object defaultValue, java.lang.String schema, java.lang.reflect.Type fieldType, java.lang.Class fieldClass, java.lang.reflect.Method method, ObjectReader initReader)
T - the type of objects that the FieldReader can deserializeobjectClass - the class containing the fieldobjectType - the type of the objectfieldName - the name of the fieldordinal - the ordinal position of the fieldfeatures - the features to use for deserializationformat - the date format to use for the fieldlocale - the locale to use for the fielddefaultValue - the default value for the fieldschema - the JSON schema to use for the fieldfieldType - the type of the fieldfieldClass - the class of the fieldmethod - the method to use for reading the fieldinitReader - the initialization reader to useprotected java.lang.Object lambdaSetter(java.lang.Class objectClass,
java.lang.Class fieldClass,
java.lang.reflect.Method method)
public java.util.function.Function<java.util.function.Consumer,ByteArrayValueConsumer> createByteArrayValueConsumerCreator(java.lang.Class objectClass, FieldReader[] fieldReaderArray)
public java.util.function.Function<java.util.function.Consumer,CharArrayValueConsumer> createCharArrayValueConsumerCreator(java.lang.Class objectClass, FieldReader[] fieldReaderArray)
private java.util.List<FieldReader> listOf(FieldReader fieldReader)
private void putIfAbsent(java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders, java.lang.String fieldName, FieldReader fieldReader, java.lang.Class objectClass)
private FieldReader[] toFieldReaderArray(java.util.Map<java.lang.String,java.util.List<FieldReader>> fieldReaders)