Public Member Functions | |
Builder | addField (final int number, final Field field) |
Map< Integer, Field > | asMap () |
UnknownFieldSet | build () |
UnknownFieldSet | buildPartial () |
Builder | clear () |
Builder | clearField (final int number) |
Builder | clone () |
UnknownFieldSet | getDefaultInstanceForType () |
boolean | hasField (final int number) |
boolean | isInitialized () |
boolean | mergeDelimitedFrom (InputStream input) throws IOException |
boolean | mergeDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException |
Builder | mergeField (final int number, final Field field) |
boolean | mergeFieldFrom (final int tag, final CodedInputStream input) throws IOException |
Builder | mergeFrom (byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException |
Builder | mergeFrom (byte[] data, int off, int len) throws InvalidProtocolBufferException |
Builder | mergeFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException |
Builder | mergeFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException |
Builder | mergeFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException |
Builder | mergeFrom (final byte[] data) throws InvalidProtocolBufferException |
Builder | mergeFrom (final ByteString data) throws InvalidProtocolBufferException |
Builder | mergeFrom (final CodedInputStream input) throws IOException |
Builder | mergeFrom (final InputStream input) throws IOException |
Builder | mergeFrom (final UnknownFieldSet other) |
Builder | mergeFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException |
Builder | mergeFrom (MessageLite m) |
Builder | mergeLengthDelimitedField (final int number, final ByteString value) |
Builder | mergeVarintField (final int number, final int value) |
Private Member Functions | |
Builder () | |
Field.Builder | getFieldBuilder (final int number) |
void | reinitialize () |
Static Private Member Functions | |
static Builder | create () |
Private Attributes | |
Map< Integer, Field > | fields |
Field.Builder | lastField |
int | lastFieldNumber |
Builder for UnknownFieldSets.
Note that this class maintains Field.Builders for all fields in the set. Thus, adding one element to an existing Field does not require making a copy. This is important for efficient parsing of unknown repeated fields. However, it implies that {}s cannot be constructed independently, nor can two UnknownFieldSet}s share the same Field object. Use UnknownFieldSet#newBuilder() to construct a
.
Definition at line 308 of file UnknownFieldSet.java.
|
inlineprivate |
Definition at line 310 of file UnknownFieldSet.java.
|
inline |
Add a field to the
. If a field with the same number already exists, it is removed.
Definition at line 491 of file UnknownFieldSet.java.
Get all present
s as an immutable
. If more fields are added, the changes may or may not be reflected in this map.
Definition at line 511 of file UnknownFieldSet.java.
|
inline |
Build the UnknownFieldSet and return it.
Once
has been called, the
will no longer be usable. Calling any method after
will result in undefined behavior and can cause a
to be thrown.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 358 of file UnknownFieldSet.java.
|
inline |
Like build(), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned. Subsequent changes to the Builder will not affect the returned message.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 374 of file UnknownFieldSet.java.
|
inline |
Reset the builder to an empty set.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 401 of file UnknownFieldSet.java.
|
inline |
Clear fields from the set with a given field number.
Definition at line 407 of file UnknownFieldSet.java.
|
inline |
Clones the Builder.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 380 of file UnknownFieldSet.java.
|
inlinestaticprivate |
Definition at line 320 of file UnknownFieldSet.java.
|
inline |
Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the
method of generated message classes in that this method is an abstract method of the
interface whereas
is a static method of a specific class. They return the same thing.
Implements com.google.protobuf.MessageLiteOrBuilder.
Definition at line 389 of file UnknownFieldSet.java.
|
inlineprivate |
Get a field builder for the given field number which includes any values that already exist.
Definition at line 329 of file UnknownFieldSet.java.
|
inline |
Check if the given field number is present in the set.
Definition at line 480 of file UnknownFieldSet.java.
|
inline |
Returns true if all required fields in the message and all embedded messages are set, false otherwise.
See also: MessageOrBuilder#getInitializationErrorString()
Implements com.google.protobuf.MessageLiteOrBuilder.
Definition at line 690 of file UnknownFieldSet.java.
|
inline |
Like mergeFrom(InputStream), but does not read until EOF. Instead, the size of the message (encoded as a varint) is read first, then the message data. Use {} to write messages in this format. True if successful, or false if the stream is at EOF when the method starts. Any other error (including reaching EOF during parsing) will cause an exception to be thrown.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 612 of file UnknownFieldSet.java.
|
inline |
Like mergeDelimitedFrom(InputStream) but supporting extensions.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 624 of file UnknownFieldSet.java.
|
inline |
Add a field to the
. If a field with the same number already exists, the two are merged.
Definition at line 439 of file UnknownFieldSet.java.
|
inline |
Parse a single field from
and merge it into this set.
tag | The field's tag number, which was already parsed. |
Definition at line 534 of file UnknownFieldSet.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream,ExtensionRegistryLite).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 660 of file UnknownFieldSet.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 645 of file UnknownFieldSet.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream,ExtensionRegistryLite).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 667 of file UnknownFieldSet.java.
|
inline |
Parse
as a message of this type and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream,ExtensionRegistryLite).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 638 of file UnknownFieldSet.java.
|
inline |
Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in
. Extensions not in the registry will be treated as unknown fields.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 631 of file UnknownFieldSet.java.
|
inline |
Parse
as an
and merge it with the set being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 585 of file UnknownFieldSet.java.
|
inline |
Parse
as an
and merge it with the set being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 566 of file UnknownFieldSet.java.
|
inline |
Parse an entire message from
and merge its fields into this set.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 518 of file UnknownFieldSet.java.
|
inline |
Parse an
from
and merge it with the set being built. This is just a small wrapper around mergeFrom(CodedInputStream).
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 604 of file UnknownFieldSet.java.
|
inline |
Merge the fields from
into this set. If a field number exists in both sets,
's values for that field will be appended to the values in this set.
Definition at line 426 of file UnknownFieldSet.java.
|
inline |
Parse a message of this type from
and merge it with the message being built. This is just a small wrapper around {}. this
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 674 of file UnknownFieldSet.java.
|
inline |
Merge
into the message being built.
must have the exact same type as
(i.e.
).
Merging occurs as follows. For each field:
This is equivalent to the
method in C++.
Implements com.google.protobuf.MessageLite.Builder.
Definition at line 681 of file UnknownFieldSet.java.
|
inline |
Convenience method for merging a length-delimited field.
For use by generated code only.
Definition at line 471 of file UnknownFieldSet.java.
|
inline |
Convenience method for merging a new field containing a single varint value. This is used in particular when an unknown enum value is encountered.
Definition at line 458 of file UnknownFieldSet.java.
|
inlineprivate |
Definition at line 393 of file UnknownFieldSet.java.
Definition at line 312 of file UnknownFieldSet.java.
|
private |
Definition at line 318 of file UnknownFieldSet.java.
|
private |
Definition at line 317 of file UnknownFieldSet.java.