Package com.alibaba.fastjson2.reader
Class ObjectReaderNoneDefaultConstructor<T>
java.lang.Object
com.alibaba.fastjson2.reader.ObjectReaderBean<T>
com.alibaba.fastjson2.reader.ObjectReaderAdapter<T>
com.alibaba.fastjson2.reader.ObjectReaderNoneDefaultConstructor<T>
- All Implemented Interfaces:
ObjectReader<T>
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionObjectReaderNoneDefaultConstructor(Class objectClass, String typeKey, String typeName, long features, Function<Map<Long, Object>, T> creator, List<Constructor> alternateConstructors, String[] paramNames, FieldReader[] paramFieldReaders, FieldReader[] setterFieldReaders, Class[] seeAlso, String[] seeAlsoNames) -
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(Object[] args) createInstance(Collection collection, long features) createInstance(Map map, long features) Creates an instance of the object type using a non-default constructor with the specified values.readArrayMappingObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) Reads an object from JSON format with array mapping.readFromCSV(JSONReader jsonReader, Type fieldType, Object fieldName, long features) 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, createInstance0, getBuildFunction, getFeatures, getFieldOrdinal, getFieldReader, getFieldReaderLCase, getFieldReaders, getFieldReaderUL, getTypeKey, getTypeKeyHash, ignoreError, initDefaultValue, initStringFieldAsEmpty, readArrayMappingJSONBObject, readArrayMappingJSONBObject0, 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, getFieldReader, readObject, readObject, readObject, setFieldValue, setFieldValue, setFieldValue
-
Constructor Details
-
ObjectReaderNoneDefaultConstructor
public ObjectReaderNoneDefaultConstructor(Class objectClass, String typeKey, String typeName, long features, Function<Map<Long, Object>, T> creator, List<Constructor> alternateConstructors, String[] paramNames, FieldReader[] paramFieldReaders, FieldReader[] setterFieldReaders, Class[] seeAlso, String[] seeAlsoNames)
-
-
Method Details
-
getParameterFieldReaders
-
createInstanceNoneDefaultConstructor
Description copied from interface:ObjectReaderCreates an instance of the object type using a non-default constructor with the specified values.- Parameters:
values- the map of field hash codes to values- Returns:
- a new instance of the object created with a non-default constructor
-
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
-
readArrayMappingObject
public T readArrayMappingObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) Description copied from interface:ObjectReaderReads an object from JSON format with array mapping.- Specified by:
readArrayMappingObjectin interfaceObjectReader<T>- Overrides:
readArrayMappingObjectin 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
-
readFromCSV
-
createInstance
- Specified by:
createInstancein interfaceObjectReader<T>- Overrides:
createInstancein classObjectReaderAdapter<T>- Returns:
ObjectReader
-
createInstance
- Specified by:
createInstancein interfaceObjectReader<T>- Overrides:
createInstancein classObjectReaderAdapter<T>- Returns:
ObjectReader
-
createInstance
-