Class PolymorphicThrowableSchema

java.lang.Object
io.protostuff.runtime.PolymorphicSchema
io.protostuff.runtime.PolymorphicThrowableSchema
All Implemented Interfaces:
Schema<Object>

public abstract class PolymorphicThrowableSchema extends PolymorphicSchema
Used when the type is assignable from Throwable.
Author:
David Yu
  • Field Details

  • Constructor Details

    • PolymorphicThrowableSchema

      public PolymorphicThrowableSchema(IdStrategy strategy)
  • Method Details

    • getPipeSchema

      public Pipe.Schema<Object> getPipeSchema()
      Description copied from class: PolymorphicSchema
      The pipe schema associated with this schema.
      Specified by:
      getPipeSchema in class PolymorphicSchema
    • 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();
    • mergeFrom

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

      public void writeTo(Output output, Object value) throws IOException
      Description copied from interface: Schema
      Serializes a message/object to the output.
      Throws:
      IOException