Class ObjectReaderImplEnum

java.lang.Object
com.alibaba.fastjson2.reader.ObjectReaderImplEnum
All Implemented Interfaces:
ObjectReader

public final class ObjectReaderImplEnum extends Object implements ObjectReader
  • Constructor Details

    • ObjectReaderImplEnum

      public ObjectReaderImplEnum(Class enumClass, Method createMethod, Member valueField, Enum[] enums, Enum[] ordinalEnums, long[] enumNameHashCodes)
  • Method Details

    • 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
      Returns:
      the object class, or null if not specified
    • getEnumByHashCode

      public Enum getEnumByHashCode(long hashCode)
    • getEnum

      public Enum getEnum(String name)
    • getEnumByOrdinal

      public Enum getEnumByOrdinal(int ordinal)
    • of

      public Enum of(int intValue)
    • readJSONBObject

      public Object 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
      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 Object 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.
      Specified by:
      readObject in interface ObjectReader
      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