Class UnknownFieldSchema<T,​B>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      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 getBuilderFromMessage​(java.lang.Object message)
      Returns a builder for unknown fields in the message.
      (package private) abstract T getFromMessage​(java.lang.Object message)
      Get the unknown fields from the message.
      (package private) abstract int getSerializedSize​(T unknowns)  
      (package private) abstract int getSerializedSizeAsMessageSet​(T message)
      Get the serialized size for message set serialization.
      (package private) abstract void makeImmutable​(java.lang.Object message)
      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) void mergeFrom​(B unknownFields, Reader reader, int currentDepth)  
      (package private) boolean mergeOneFieldFrom​(B unknownFields, Reader reader, int currentDepth)
      Merges one field into the unknown fields.
      (package private) abstract B newBuilder()
      Create a new builder for unknown fields.
      (package private) abstract void setBuilderToMessage​(java.lang.Object message, B builder)
      Sets an unknown field builder into the message.
      void setRecursionLimit​(int limit)
      Set the maximum recursion limit that ArrayDecoders will allow.
      (package private) abstract void setToMessage​(java.lang.Object message, T fields)
      Sets the unknown fields into the message.
      (package private) abstract boolean shouldDiscardUnknownFields​(Reader reader)
      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
    • Field Detail

      • recursionLimit

        private static volatile int recursionLimit
    • Constructor Detail

      • UnknownFieldSchema

        UnknownFieldSchema()
    • Method Detail

      • 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​(java.lang.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​(java.lang.Object message)
        Get the unknown fields from the message.
      • getBuilderFromMessage

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

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

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

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

        final void mergeFrom​(B unknownFields,
                             Reader reader,
                             int currentDepth)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • writeTo

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

        abstract void writeAsMessageSetTo​(T unknownFields,
                                          Writer writer)
                                   throws java.io.IOException
        Throws:
        java.io.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)
      • setRecursionLimit

        public void setRecursionLimit​(int limit)
        Set the maximum recursion limit that ArrayDecoders will allow. An exception will be thrown if the depth of the message exceeds this limit.