UnknownFieldSetLite is used to keep track of fields which were seen when parsing a
protocol message but whose field numbers or types are unrecognized. This most frequently occurs
when new fields are added to a message type and then messages containing those fields are read by
old software that was compiled before the new types were added.
For use by generated code only.
| Modifier and Type | Field and Description |
|---|---|
| private int | count
The number of elements in the set. |
| private static final UnknownFieldSetLite | |
| private boolean | isMutable
Indicates that this object is mutable. |
| private int | memoizedSerializedSize
The lazily computed serialized size of the set. |
| private static final int | |
| private Object[] | objects
The boxed values of the elements in the set. |
| private int[] | tags
The tag numbers for the elements in the set. |
| Access | Constructor and Description |
|---|---|
| private | |
| private | UnknownFieldSetLite(int count, int[] tags, Object[] objects, boolean isMutable)
Constructs the |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| private void | |
| private static boolean | |
| private static boolean | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public static UnknownFieldSetLite | |
| public int | |
| public int | getSerializedSizeAsMessageSet()
Get the number of bytes required to encode this field, including field number, using |
| private static int | |
| private static int | |
| public int | |
| public void | |
| pack-priv boolean | Returns: false if the tag is an end group tag.The field's tag number, which was already parsed. tag, final CodedInputStream input)Parse a single field from |
| private UnknownFieldSetLite | mergeFrom(final CodedInputStream input)
Parse an entire message from |
| pack-priv UnknownFieldSetLite | mergeLengthDelimitedField(final int fieldNumber, final ByteString value)
Convenience method for merging a length-delimited field. |
| pack-priv UnknownFieldSetLite | mergeVarintField(int fieldNumber, int value)
Convenience method for merging a new field containing a single varint value. |
| pack-priv static UnknownFieldSetLite | mutableCopyOf(UnknownFieldSetLite first, UnknownFieldSetLite second)
Returns a mutable |
| pack-priv static UnknownFieldSetLite | |
| pack-priv final void | printWithIndent(StringBuilder
the buffer to write to buffer, int the number of spaces the fields should be indented by indent)Prints a String representation of the unknown field set. |
| pack-priv void | |
| public void | writeAsMessageSetTo(CodedOutputStream output)
Serializes the set and writes it to |
| public void |
| count | back to summary |
|---|---|
| private int count The number of elements in the set. | |
| DEFAULT_INSTANCE | back to summary |
|---|---|
| private static final UnknownFieldSetLite DEFAULT_INSTANCE | |
| isMutable | back to summary |
|---|---|
| private boolean isMutable Indicates that this object is mutable. | |
| memoizedSerializedSize | back to summary |
|---|---|
| private int memoizedSerializedSize The lazily computed serialized size of the set. | |
| MIN_CAPACITY | back to summary |
|---|---|
| private static final int MIN_CAPACITY | |
| objects | back to summary |
|---|---|
| private Object[] objects The boxed values of the elements in the set. | |
| tags | back to summary |
|---|---|
| private int[] tags The tag numbers for the elements in the set. | |
| UnknownFieldSetLite | back to summary |
|---|---|
| private UnknownFieldSetLite() Constructs a mutable | |
| UnknownFieldSetLite | back to summary |
|---|---|
| private UnknownFieldSetLite(int count, int[] tags, Object[] objects, boolean isMutable) Constructs the | |
| checkMutable | back to summary |
|---|---|
| pack-priv void checkMutable() Throws an | |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity() Ensures that our arrays are long enough to store more metadata. | |
| equals | back to summary |
|---|---|
| private static boolean equals(int[] tags1, int[] tags2, int count) | |
| equals | back to summary |
|---|---|
| private static boolean equals(Object[] objects1, Object[] objects2, int count) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDefaultInstance | back to summary |
|---|---|
| public static UnknownFieldSetLite getDefaultInstance() Get an empty For use by generated code only. | |
| getSerializedSize | back to summary |
|---|---|
| public int getSerializedSize() Get the number of bytes required to encode this set. For use by generated code only. | |
| getSerializedSizeAsMessageSet | back to summary |
|---|---|
| public int getSerializedSizeAsMessageSet() Get the number of bytes required to encode this field, including field number, using | |
| hashCode | back to summary |
|---|---|
| private static int hashCode(int[] tags, int count) | |
| hashCode | back to summary |
|---|---|
| private static int hashCode(Object[] objects, int count) | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| makeImmutable | back to summary |
|---|---|
| public void makeImmutable() Marks this object as immutable. Future calls to methods that attempt to modify this object will throw. | |
| mergeFieldFrom | back to summary |
|---|---|
| pack-priv boolean mergeFieldFrom(final int tag, final CodedInputStream input) throws IOException Parse a single field from For use by generated code only.
| |
| mergeFrom | back to summary |
|---|---|
| private UnknownFieldSetLite mergeFrom(final CodedInputStream input) throws IOException Parse an entire message from | |
| mergeLengthDelimitedField | back to summary |
|---|---|
| pack-priv UnknownFieldSetLite mergeLengthDelimitedField(final int fieldNumber, final ByteString value) Convenience method for merging a length-delimited field. For use by generated code only. | |
| mergeVarintField | back to summary |
|---|---|
| pack-priv UnknownFieldSetLite mergeVarintField(int fieldNumber, int value) Convenience method for merging a new field containing a single varint value. This is used in particular when an unknown enum value is encountered. For use by generated code only. | |
| mutableCopyOf | back to summary |
|---|---|
| pack-priv static UnknownFieldSetLite mutableCopyOf(UnknownFieldSetLite first, UnknownFieldSetLite second) Returns a mutable | |
| newInstance | back to summary |
|---|---|
| pack-priv static UnknownFieldSetLite newInstance() Returns a new mutable instance. | |
| printWithIndent | back to summary |
|---|---|
| pack-priv final void printWithIndent(StringBuilder buffer, int indent) Prints a String representation of the unknown field set. For use by generated code only.
| |
| storeField | back to summary |
|---|---|
| pack-priv void storeField(int tag, Object value) | |
| writeAsMessageSetTo | back to summary |
|---|---|
| public void writeAsMessageSetTo(CodedOutputStream output) throws IOException Serializes the set and writes it to For use by generated code only. | |
| writeTo | back to summary |
|---|---|
| public void writeTo(CodedOutputStream output) throws IOException Serializes the set and writes it to For use by generated code only. | |