Class ArraySchemas.Base

java.lang.Object
io.protostuff.runtime.PolymorphicSchema
io.protostuff.runtime.ArraySchemas.Base
All Implemented Interfaces:
Schema<Object>
Direct Known Subclasses:
ArraySchemas.BigDecimalArray, ArraySchemas.BigIntegerArray, ArraySchemas.BoolArray, ArraySchemas.ByteArrayArray, ArraySchemas.ByteStringArray, ArraySchemas.CharArray, ArraySchemas.DateArray, ArraySchemas.DelegateArray, ArraySchemas.DoubleArray, ArraySchemas.EnumArray, ArraySchemas.FloatArray, ArraySchemas.Int32Array, ArraySchemas.Int64Array, ArraySchemas.PojoArray, ArraySchemas.ShortArray, ArraySchemas.StringArray
Enclosing class:
ArraySchemas

public abstract static class ArraySchemas.Base extends PolymorphicSchema
  • Field Details

    • handler

      protected final PolymorphicSchema.Handler handler
    • allowNullArrayElement

      protected final boolean allowNullArrayElement
  • Constructor Details

  • Method Details

    • getFieldName

      public String getFieldName(int number)
      Description copied from interface: Schema
      Gets the field name associated with the number. This is particularly useful when serializing to different formats (Eg. JSON). When using numeric field names:
       return String.valueOf(number);
       
    • getFieldNumber

      public int getFieldNumber(String name)
      Description copied from interface: Schema
      Gets the field number associated with the name. This is particularly useful when serializing to different formats (Eg. JSON). When using numeric field names:
       return Integer.parseInt(name);
       
    • messageFullName

      public String messageFullName()
      Description copied from interface: Schema
      Returns the full name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getName();
    • messageName

      public String messageName()
      Description copied from interface: Schema
      Returns the simple name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getSimpleName();
    • setValue

      protected void setValue(Object value, Object owner)
      Description copied from class: PolymorphicSchema
      Set the value to the owner.
      Specified by:
      setValue in class PolymorphicSchema
    • mergeFrom

      public void mergeFrom(Input input, Object owner) throws IOException
      Description copied from interface: Schema
      Deserializes a message/object from the input.
      Throws:
      IOException
    • readFrom

      protected abstract Object readFrom(Input input, Object owner) throws IOException
      Throws:
      IOException