Class TypeSpecificMarshaller<T extends com.google.protobuf.Message>

java.lang.Object
org.curioswitch.common.protobuf.json.TypeSpecificMarshaller<T>

public abstract class TypeSpecificMarshaller<T extends com.google.protobuf.Message> extends Object
Abstract class for protobuf marshallers. Subclasses implement serialization and parsing logic only for the specific Message type T. For well known types, this is hand-written code and for others, bytecode is automatically generated for handling the type.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doMerge(com.fasterxml.jackson.core.JsonParser parser, int currentDepth, com.google.protobuf.Message.Builder messageBuilder)
     
    protected void
    doWrite(T message, com.fasterxml.jackson.core.JsonGenerator gen)
     

    Methods inherited from class java.lang.Object

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

    • TypeSpecificMarshaller

      protected TypeSpecificMarshaller(T prototype)
  • Method Details

    • doWrite

      protected void doWrite(T message, com.fasterxml.jackson.core.JsonGenerator gen) throws IOException
      Throws:
      IOException
    • doMerge

      protected void doMerge(com.fasterxml.jackson.core.JsonParser parser, int currentDepth, com.google.protobuf.Message.Builder messageBuilder) throws IOException
      Throws:
      IOException