Class UnknownFieldSchema<T,B>

java.lang.Object
com.google.protobuf.UnknownFieldSchema<T,B>
Direct Known Subclasses:
UnknownFieldSetLiteSchema, UnknownFieldSetSchema

@ExperimentalApi abstract class UnknownFieldSchema<T,B> extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) abstract void
    addFixed32(B fields, int number, int value)
    Adds a fixed32 value to the unknown fields.
    (package private) abstract void
    addFixed64(B fields, int number, long value)
    Adds a fixed64 value to the unknown fields.
    (package private) abstract void
    addGroup(B fields, int number, T subFieldSet)
    Adds a group value to the unknown fields.
    (package private) abstract void
    addLengthDelimited(B fields, int number, ByteString value)
    Adds a length delimited value to the unknown fields.
    (package private) abstract void
    addVarint(B fields, int number, long value)
    Adds a varint value to the unknown fields.
    (package private) abstract B
    Returns a builder for unknown fields in the message.
    (package private) abstract T
    Get the unknown fields from the message.
    (package private) abstract int
    getSerializedSize(T unknowns)
     
    (package private) abstract int
    Get the serialized size for message set serialization.
    (package private) abstract void
    Marks unknown fields as immutable.
    (package private) abstract T
    merge(T destination, T source)
    Merges source into destination and returns the merged instance.
    (package private) final void
    mergeFrom(B unknownFields, Reader reader)
     
    (package private) final boolean
    mergeOneFieldFrom(B unknownFields, Reader reader)
    Merges one field into the unknown fields.
    (package private) abstract B
    Create a new builder for unknown fields.
    (package private) abstract void
    setBuilderToMessage(Object message, B builder)
    Sets an unknown field builder into the message.
    (package private) abstract void
    setToMessage(Object message, T fields)
    Sets the unknown fields into the message.
    (package private) abstract boolean
    Whether unknown fields should be dropped.
    (package private) abstract T
    toImmutable(B fields)
    Returns an immutable instance of the field container.
    (package private) abstract void
    writeAsMessageSetTo(T unknownFields, Writer writer)
     
    (package private) abstract void
    writeTo(T unknownFields, Writer writer)
     

    Methods inherited from class java.lang.Object

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

    • UnknownFieldSchema

      UnknownFieldSchema()
  • Method Details

    • shouldDiscardUnknownFields

      abstract boolean shouldDiscardUnknownFields(Reader reader)
      Whether unknown fields should be dropped.
    • addVarint

      abstract void addVarint(B fields, int number, long value)
      Adds a varint value to the unknown fields.
    • addFixed32

      abstract void addFixed32(B fields, int number, int value)
      Adds a fixed32 value to the unknown fields.
    • addFixed64

      abstract void addFixed64(B fields, int number, long value)
      Adds a fixed64 value to the unknown fields.
    • addLengthDelimited

      abstract void addLengthDelimited(B fields, int number, ByteString value)
      Adds a length delimited value to the unknown fields.
    • addGroup

      abstract void addGroup(B fields, int number, T subFieldSet)
      Adds a group value to the unknown fields.
    • newBuilder

      abstract B newBuilder()
      Create a new builder for unknown fields.
    • toImmutable

      abstract T toImmutable(B fields)
      Returns an immutable instance of the field container.
    • setToMessage

      abstract void setToMessage(Object message, T fields)
      Sets the unknown fields into the message. Caller must take care of the mutability of the fields.
    • getFromMessage

      abstract T getFromMessage(Object message)
      Get the unknown fields from the message.
    • getBuilderFromMessage

      abstract B getBuilderFromMessage(Object message)
      Returns a builder for unknown fields in the message.
    • setBuilderToMessage

      abstract void setBuilderToMessage(Object message, B builder)
      Sets an unknown field builder into the message.
    • makeImmutable

      abstract void makeImmutable(Object message)
      Marks unknown fields as immutable.
    • mergeOneFieldFrom

      final boolean mergeOneFieldFrom(B unknownFields, Reader reader) throws IOException
      Merges one field into the unknown fields.
      Throws:
      IOException
    • mergeFrom

      final void mergeFrom(B unknownFields, Reader reader) throws IOException
      Throws:
      IOException
    • writeTo

      abstract void writeTo(T unknownFields, Writer writer) throws IOException
      Throws:
      IOException
    • writeAsMessageSetTo

      abstract void writeAsMessageSetTo(T unknownFields, Writer writer) throws IOException
      Throws:
      IOException
    • merge

      abstract T merge(T destination, T source)
      Merges source into destination and returns the merged instance.
    • getSerializedSizeAsMessageSet

      abstract int getSerializedSizeAsMessageSet(T message)
      Get the serialized size for message set serialization.
    • getSerializedSize

      abstract int getSerializedSize(T unknowns)