Class ObjectReaderImplFromLong<T>

java.lang.Object
com.alibaba.fastjson2.reader.ObjectReaderImplFromLong<T>
All Implemented Interfaces:
ObjectReader<T>

public final class ObjectReaderImplFromLong<T> extends Object
  • Field Details

    • objectClass

      protected final Class objectClass
  • Constructor Details

    • ObjectReaderImplFromLong

      public ObjectReaderImplFromLong(Class<T> objectClass, LongFunction creator)
  • Method Details

    • readJSONBObject

      public T readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features)
      Description copied from interface: ObjectReader
      Reads an object from JSONB format.
      Specified by:
      readJSONBObject in interface ObjectReader<T>
      Parameters:
      jsonReader - the JSONReader to use for parsing
      fieldType - the type of the field being read
      fieldName - the name of the field being read
      features - the features to use
      Returns:
      the deserialized object
    • readObject

      public T readObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features)
      Description copied from interface: ObjectReader
      Reads an object from the specified JSONReader with the given field type, field name, and features.
      Parameters:
      jsonReader - the JSONReader to use for parsing
      fieldType - the type of the field being read
      fieldName - the name of the field being read
      features - the features to use
      Returns:
      the deserialized object
    • getObjectClass

      public Class getObjectClass()
      Description copied from interface: ObjectReader
      Gets the class of objects that this ObjectReader can deserialize.
      Specified by:
      getObjectClass in interface ObjectReader<T>
      Returns:
      the object class, or null if not specified
    • createInstance

      public T createInstance(long features)
      Specified by:
      createInstance in interface ObjectReader<T>
      Returns:
      ObjectReader