Interface Delegate<V>

  • All Known Implementing Classes:
    RuntimeFieldFactory

    public interface Delegate<V>
    Controls how certain types are serialized and can even override the existing serializers because this has higher priority when the fields are being built.
    • Method Detail

      • getFieldType

        WireFormat.FieldType getFieldType()
        The field type (for possible reflective operations in future releases).
      • readFrom

        V readFrom​(Input input)
            throws java.io.IOException
        Reads the value from the input.
        Throws:
        java.io.IOException
      • writeTo

        void writeTo​(Output output,
                     int number,
                     V value,
                     boolean repeated)
              throws java.io.IOException
        Writes the value to the output.
        Throws:
        java.io.IOException
      • transfer

        void transfer​(Pipe pipe,
                      Input input,
                      Output output,
                      int number,
                      boolean repeated)
               throws java.io.IOException
        Transfers the type from the input to the output.
        Throws:
        java.io.IOException
      • typeClass

        java.lang.Class<?> typeClass()
        The class of the target value.