Package com.alibaba.fastjson2.reader
Class ObjectReader4<T>
java.lang.Object
com.alibaba.fastjson2.reader.ObjectReaderBean<T>
com.alibaba.fastjson2.reader.ObjectReaderAdapter<T>
com.alibaba.fastjson2.reader.ObjectReader4<T>
- All Implemented Interfaces:
ObjectReader<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FieldReaderprotected final FieldReaderprotected final FieldReaderprotected final FieldReaderprotected ObjectReaderprotected ObjectReaderprotected ObjectReaderprotected ObjectReaderFields inherited from class com.alibaba.fastjson2.reader.ObjectReaderAdapter
fieldReaders, typeKey, typeKeyHashCodeFields inherited from class com.alibaba.fastjson2.reader.ObjectReaderBean
autoTypeBeforeHandler, buildFunction, creator, extraFieldReader, features, hasDefaultValue, objectClass, schema, serializable, typeName, typeNameHashFields inherited from interface com.alibaba.fastjson2.reader.ObjectReader
HASH_TYPE, VALUE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionObjectReader4(Class objectClass, String typeKey, String typeName, long features, JSONSchema schema, Supplier<T> creator, Function buildFunction, FieldReader... fieldReaders) ObjectReader4(Class objectClass, String typeKey, String typeName, long features, Supplier<T> creator, Function buildFunction, FieldReader... fieldReaders) -
Method Summary
Modifier and TypeMethodDescriptiongetFieldReader(long hashCode) Gets the FieldReader for the specified field hash code.getFieldReaderLCase(long hashCode) Gets the FieldReader for the specified field hash code, using lowercase matching.protected voidinitDefaultValue(T object) readArrayMappingJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) Reads an object from JSONB format with array mapping.readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) Reads an object from JSONB format.readObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) Reads an object from the specified JSONReader with the given field type, field name, and features.Methods inherited from class com.alibaba.fastjson2.reader.ObjectReaderAdapter
apply, autoType, autoType, autoType, autoType, createInstance, createInstance, createInstance, createInstance0, getBuildFunction, getFeatures, getFieldOrdinal, getFieldReaders, getFieldReaderUL, getTypeKey, getTypeKeyHash, ignoreError, initStringFieldAsEmpty, readArrayMappingJSONBObject0, readArrayMappingObject, readFieldValue, readFieldValueMethods inherited from class com.alibaba.fastjson2.reader.ObjectReaderBean
acceptExtra, checkAutoType, checkAutoType, checkAutoType0, getAutoTypeBeforeHandler, getObjectClass, processExtra, processExtra, processObjectInputSingleItemArray, readFieldValueWithLCase, readObject, setAutoTypeBeforeHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alibaba.fastjson2.reader.ObjectReader
accept, acceptExtra, createInstance, createInstance, createInstance, createInstance, createInstanceNoneDefaultConstructor, getFieldReader, readObject, readObject, readObject, setFieldValue, setFieldValue, setFieldValue
-
Field Details
-
fieldReader0
-
fieldReader1
-
fieldReader2
-
fieldReader3
-
objectReader0
-
objectReader1
-
objectReader2
-
objectReader3
-
-
Constructor Details
-
ObjectReader4
-
ObjectReader4
public ObjectReader4(Class objectClass, String typeKey, String typeName, long features, JSONSchema schema, Supplier<T> creator, Function buildFunction, FieldReader... fieldReaders)
-
-
Method Details
-
initDefaultValue
- Overrides:
initDefaultValuein classObjectReaderAdapter<T>
-
readJSONBObject
Description copied from interface:ObjectReaderReads an object from JSONB format.- Specified by:
readJSONBObjectin interfaceObjectReader<T>- Overrides:
readJSONBObjectin classObjectReaderAdapter<T>- Parameters:
jsonReader- the JSONReader to use for parsingfieldType- the type of the field being readfieldName- the name of the field being readfeatures- the features to use- Returns:
- the deserialized object
-
readArrayMappingJSONBObject
public T readArrayMappingJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) Description copied from interface:ObjectReaderReads an object from JSONB format with array mapping.- Specified by:
readArrayMappingJSONBObjectin interfaceObjectReader<T>- Overrides:
readArrayMappingJSONBObjectin classObjectReaderAdapter<T>- Parameters:
jsonReader- the JSONReader to use for parsingfieldType- the type of the field being readfieldName- the name of the field being readfeatures- the features to use- Returns:
- the deserialized object
-
readObject
Description copied from interface:ObjectReaderReads an object from the specified JSONReader with the given field type, field name, and features.- Specified by:
readObjectin interfaceObjectReader<T>- Overrides:
readObjectin classObjectReaderBean<T>- Parameters:
jsonReader- the JSONReader to use for parsingfieldType- the type of the field being readfieldName- the name of the field being readfeatures- the features to use- Returns:
- the deserialized object
-
getFieldReader
Description copied from interface:ObjectReaderGets the FieldReader for the specified field hash code.- Specified by:
getFieldReaderin interfaceObjectReader<T>- Overrides:
getFieldReaderin classObjectReaderAdapter<T>- Parameters:
hashCode- the hash code of the field name- Returns:
- the FieldReader for the field, or null if not found
-
getFieldReaderLCase
Description copied from interface:ObjectReaderGets the FieldReader for the specified field hash code, using lowercase matching.- Specified by:
getFieldReaderLCasein interfaceObjectReader<T>- Overrides:
getFieldReaderLCasein classObjectReaderAdapter<T>- Parameters:
hashCode- the hash code of the field name (lowercase)- Returns:
- the FieldReader for the field, or null if not found
-