public class ObjectReaderAdapter<T> extends ObjectReaderBean<T>
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.reflect.Constructor |
constructor |
protected FieldReader[] |
fieldReaders |
(package private) long[] |
hashCodes |
(package private) long[] |
hashCodesLCase |
(package private) boolean |
instantiationError |
(package private) short[] |
mapping |
(package private) short[] |
mappingLCase |
(package private) int |
parameterCount |
(package private) java.lang.Class[] |
seeAlso |
(package private) java.lang.Class |
seeAlsoDefault |
(package private) java.util.Map<java.lang.Long,java.lang.Class> |
seeAlsoMapping |
(package private) java.lang.String[] |
seeAlsoNames |
protected java.lang.String |
typeKey |
protected long |
typeKeyHashCode |
autoTypeBeforeHandler, buildFunction, creator, extraFieldReader, features, hasDefaultValue, objectClass, schema, serializable, typeName, typeNameHashHASH_TYPE, VALUE_NAME| Constructor and Description |
|---|
ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
java.lang.Class seeAlsoDefault,
FieldReader... fieldReaders) |
ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
FieldReader... fieldReaders) |
ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders) |
ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders) |
ObjectReaderAdapter(java.lang.Class objectClass,
java.util.function.Supplier<T> creator,
FieldReader... fieldReaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(java.util.function.Consumer<FieldReader> fieldReaderConsumer) |
ObjectReader |
autoType(JSONReader.Context context,
long typeHash)
Resolves an ObjectReader for the specified type hash using the JSON reader context.
|
protected T |
autoType(JSONReader jsonReader) |
java.lang.Object |
autoType(JSONReader jsonReader,
java.lang.Class expectClass,
long features) |
ObjectReader |
autoType(ObjectReaderProvider provider,
long typeHash)
Resolves an ObjectReader for the specified type hash using the ObjectReaderProvider.
|
T |
createInstance(java.util.Collection collection,
long features) |
T |
createInstance(long features) |
T |
createInstance(java.util.Map map,
long features) |
protected java.lang.Object |
createInstance0(long features) |
java.util.function.Function |
getBuildFunction()
Gets the build function used to construct the final object instance.
|
long |
getFeatures()
Gets the features enabled by this ObjectReader.
|
int |
getFieldOrdinal(long hashCode) |
FieldReader |
getFieldReader(long hashCode)
Gets the FieldReader for the specified field hash code.
|
FieldReader |
getFieldReaderLCase(long hashCode)
Gets the FieldReader for the specified field hash code, using lowercase matching.
|
FieldReader[] |
getFieldReaders() |
protected FieldReader |
getFieldReaderUL(long hashCode,
JSONReader jsonReader,
long features) |
java.lang.String |
getTypeKey()
Gets the type key used for auto-type support.
|
long |
getTypeKeyHash()
Gets the hash code of the type key used for auto-type support.
|
protected boolean |
ignoreError(FieldReader fieldReader) |
protected void |
initDefaultValue(T object) |
protected void |
initStringFieldAsEmpty(java.lang.Object object) |
T |
readArrayMappingJSONBObject(JSONReader jsonReader,
java.lang.reflect.Type fieldType,
java.lang.Object fieldName,
long features)
Reads an object from JSONB format with array mapping.
|
protected void |
readArrayMappingJSONBObject0(JSONReader jsonReader,
java.lang.Object object,
int entryCnt) |
T |
readArrayMappingObject(JSONReader jsonReader,
java.lang.reflect.Type fieldType,
java.lang.Object fieldName,
long features)
Reads an object from JSON format with array mapping.
|
protected java.util.Map<java.lang.Long,java.lang.Object> |
readFieldValue(long hashCode,
JSONReader jsonReader,
long features,
java.util.Map<java.lang.Long,java.lang.Object> map) |
protected void |
readFieldValue(long hashCode,
JSONReader jsonReader,
long features,
java.lang.Object object) |
T |
readJSONBObject(JSONReader jsonReader,
java.lang.reflect.Type fieldType,
java.lang.Object fieldName,
long features)
Reads an object from JSONB format.
|
acceptExtra, checkAutoType, checkAutoType, checkAutoType0, getAutoTypeBeforeHandler, getObjectClass, processExtra, processExtra, processObjectInputSingleItemArray, readFieldValueWithLCase, readObject, readObject, setAutoTypeBeforeHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccept, acceptExtra, createInstance, createInstance, createInstance, createInstance, createInstanceNoneDefaultConstructor, getFieldReader, readObject, readObject, readObject, setFieldValue, setFieldValue, setFieldValueprotected final java.lang.String typeKey
protected final long typeKeyHashCode
protected final FieldReader[] fieldReaders
final long[] hashCodes
final short[] mapping
final long[] hashCodesLCase
final short[] mappingLCase
final java.lang.reflect.Constructor constructor
final int parameterCount
volatile boolean instantiationError
final java.lang.Class[] seeAlso
final java.lang.String[] seeAlsoNames
final java.lang.Class seeAlsoDefault
final java.util.Map<java.lang.Long,java.lang.Class> seeAlsoMapping
public ObjectReaderAdapter(java.lang.Class objectClass,
java.util.function.Supplier<T> creator,
FieldReader... fieldReaders)
public ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders)
public ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
FieldReader... fieldReaders)
public ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
FieldReader... fieldReaders)
public ObjectReaderAdapter(java.lang.Class objectClass,
java.lang.String typeKey,
java.lang.String typeName,
long features,
JSONSchema schema,
java.util.function.Supplier<T> creator,
java.util.function.Function buildFunction,
java.lang.Class[] seeAlso,
java.lang.String[] seeAlsoNames,
java.lang.Class seeAlsoDefault,
FieldReader... fieldReaders)
public final java.lang.String getTypeKey()
ObjectReaderpublic final long getTypeKeyHash()
ObjectReaderpublic final long getFeatures()
ObjectReaderpublic FieldReader[] getFieldReaders()
public void apply(java.util.function.Consumer<FieldReader> fieldReaderConsumer)
public java.lang.Object autoType(JSONReader jsonReader, java.lang.Class expectClass, long features)
public final java.util.function.Function getBuildFunction()
ObjectReaderpublic T readArrayMappingObject(JSONReader jsonReader, java.lang.reflect.Type fieldType, java.lang.Object fieldName, long features)
ObjectReaderjsonReader - the JSONReader to use for parsingfieldType - the type of the field being readfieldName - the name of the field being readfeatures - the features to usepublic T readArrayMappingJSONBObject(JSONReader jsonReader, java.lang.reflect.Type fieldType, java.lang.Object fieldName, long features)
ObjectReaderjsonReader - the JSONReader to use for parsingfieldType - the type of the field being readfieldName - the name of the field being readfeatures - the features to useprotected void readArrayMappingJSONBObject0(JSONReader jsonReader, java.lang.Object object, int entryCnt)
protected java.lang.Object createInstance0(long features)
protected void initDefaultValue(T object)
initDefaultValue in class ObjectReaderBean<T>public T createInstance(java.util.Collection collection, long features)
Tpublic T createInstance(long features)
Tprotected final boolean ignoreError(FieldReader fieldReader)
public FieldReader getFieldReader(long hashCode)
ObjectReaderhashCode - the hash code of the field namepublic int getFieldOrdinal(long hashCode)
protected final FieldReader getFieldReaderUL(long hashCode, JSONReader jsonReader, long features)
protected final java.util.Map<java.lang.Long,java.lang.Object> readFieldValue(long hashCode,
JSONReader jsonReader,
long features,
java.util.Map<java.lang.Long,java.lang.Object> map)
protected final void readFieldValue(long hashCode,
JSONReader jsonReader,
long features,
java.lang.Object object)
public FieldReader getFieldReaderLCase(long hashCode)
ObjectReaderhashCode - the hash code of the field name (lowercase)protected T autoType(JSONReader jsonReader)
public T readJSONBObject(JSONReader jsonReader, java.lang.reflect.Type fieldType, java.lang.Object fieldName, long features)
ObjectReaderjsonReader - the JSONReader to use for parsingfieldType - the type of the field being readfieldName - the name of the field being readfeatures - the features to usepublic ObjectReader autoType(ObjectReaderProvider provider, long typeHash)
ObjectReaderprovider - the ObjectReaderProvidertypeHash - the hash code of the type namepublic ObjectReader autoType(JSONReader.Context context, long typeHash)
ObjectReadercontext - the JSON reader contexttypeHash - the hash code of the type nameprotected void initStringFieldAsEmpty(java.lang.Object object)
initStringFieldAsEmpty in class ObjectReaderBean<T>public T createInstance(java.util.Map map, long features)
T