Class Field<T>

java.lang.Object
io.protostuff.runtime.Field<T>
Direct Known Subclasses:
RuntimeCollectionField, RuntimeDerivativeField, RuntimeMapField, RuntimeMessageField, RuntimeObjectField

public abstract class Field<T> extends Object
Represents a field of a message/pojo.
  • Field Details

    • type

      public final WireFormat.FieldType type
    • number

      public final int number
    • name

      public final String name
    • repeated

      public final boolean repeated
    • groupFilter

      public final int groupFilter
  • Constructor Details

  • Method Details

    • copy

      protected Field<T> copy(IdStrategy strategy)
      No copy by default.
    • writeTo

      protected abstract void writeTo(Output output, T message) throws IOException
      Writes the value of a field to the output.
      Throws:
      IOException
    • mergeFrom

      protected abstract void mergeFrom(Input input, T message) throws IOException
      Reads the field value into the message.
      Throws:
      IOException
    • transfer

      protected abstract void transfer(Pipe pipe, Input input, Output output, boolean repeated) throws IOException
      Transfer the input field to the output field.
      Throws:
      IOException