Class FieldInfo

  • All Implemented Interfaces:
    java.lang.Comparable<FieldInfo>

    public final class FieldInfo
    extends java.lang.Object
    implements java.lang.Comparable<FieldInfo>
    Information for one field in an object that is (de)serialized.

    Used by B2ObjectHandler and B2JsonObjectHandler.

    • Field Detail

      • field

        public final java.lang.reflect.Field field
      • defaultValueJsonOrNull

        public final java.lang.String defaultValueJsonOrNull
      • constructorArgIndex

        public int constructorArgIndex
      • isSensitive

        public final boolean isSensitive
      • omitNull

        public final boolean omitNull
      • omitZero

        public final boolean omitZero
    • Method Detail

      • getName

        @Deprecated
        public java.lang.String getName()
        Deprecated.
        use getJsonMemberName() instead which is clearer.
        Returns the member name that this field is serialized to in Json.
      • getJsonMemberName

        public java.lang.String getJsonMemberName()
        Returns the member name that this field is serialized to in Json.
      • getIsSensitive

        public boolean getIsSensitive()
      • compareTo

        public int compareTo​(FieldInfo o)
        Specified by:
        compareTo in interface java.lang.Comparable<FieldInfo>
      • setConstructorArgIndex

        public void setConstructorArgIndex​(int index)
      • isInVersion

        public boolean isInVersion​(int version)
      • isRequiredAndInVersion

        public boolean isRequiredAndInVersion​(int version)