Class FieldInfo


  • public final class FieldInfo
    extends java.lang.Object
    Represents metadata for a Fauna document field in a class, including its name, type, associated codec, and other properties used for serialization and deserialization.
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldInfo​(java.lang.reflect.Field field, java.lang.String name, java.lang.Class<?> clazz, java.lang.reflect.Type[] genericTypeArgs, CodecProvider provider, FieldType fieldType)
      Constructs a FieldInfo object with the specified field metadata.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Codec getCodec()
      Retrieves the codec used to serialize and deserialize the field.
      java.lang.reflect.Field getField()
      Retrieves the Field object representing this field in the class.
      FieldType getFieldType()
      Retrieves the FieldType of this field.
      java.lang.String getName()
      Retrieves the name of the field.
      java.lang.Class<?> getType()
      Retrieves the class type of the field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FieldInfo

        public FieldInfo​(java.lang.reflect.Field field,
                         java.lang.String name,
                         java.lang.Class<?> clazz,
                         java.lang.reflect.Type[] genericTypeArgs,
                         CodecProvider provider,
                         FieldType fieldType)
        Constructs a FieldInfo object with the specified field metadata.
        Parameters:
        field - The field represented by this FieldInfo instance.
        name - The name of the field.
        clazz - The class type of the field.
        genericTypeArgs - An array of generic type arguments for the field, if any.
        provider - The CodecProvider used to obtain a codec for this field.
        fieldType - The FieldType of the field.
    • Method Detail

      • getName

        public java.lang.String getName()
        Retrieves the name of the field.
        Returns:
        A String representing the field name.
      • getType

        public java.lang.Class<?> getType()
        Retrieves the class type of the field.
        Returns:
        A Class<?> representing the field's class type.
      • getFieldType

        public FieldType getFieldType()
        Retrieves the FieldType of this field.
        Returns:
        The FieldType associated with this field.
      • getCodec

        public Codec getCodec()
        Retrieves the codec used to serialize and deserialize the field. If the codec is not already set, it will be retrieved from the CodecProvider and cached.
        Returns:
        A Codec instance associated with the field type.
      • getField

        public java.lang.reflect.Field getField()
        Retrieves the Field object representing this field in the class.
        Returns:
        The Field associated with this FieldInfo.