Protected Member Functions | |
BuilderType | internalMergeFrom (AbstractMessageLite other) |
![]() | |
abstract BuilderType | internalMergeFrom (MessageType message) |
Static Protected Member Functions | |
static UninitializedMessageException | newUninitializedMessageException (Message message) |
![]() | |
static< T > void | addAll (final Iterable< T > values, final Collection<? super T > list) |
static< T > void | addAll (final Iterable< T > values, final List<? super T > list) |
static UninitializedMessageException | newUninitializedMessageException (MessageLite message) |
A partial implementation of the Message.Builder interface which implements as many methods of that interface as possible in terms of other methods.
Definition at line 318 of file AbstractMessage.java.
|
inline |
Resets all fields to their default values.
Implements com.google.protobuf.Message.Builder.
Definition at line 347 of file AbstractMessage.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Definition at line 342 of file AbstractMessage.java.
|
inline |
|
inline |
Returns a list of field paths (e.g. "foo.bar.baz") of required fields which are not set in this message. You should call MessageLiteOrBuilder#isInitialized() first to check if there are any missing fields, as that method is likely to be much faster than this one even when the message is fully-initialized.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 355 of file AbstractMessage.java.
|
inline |
Definition at line 458 of file AbstractMessage.java.
|
inline |
Returns a comma-delimited list of required fields which are not set in this message object. You should call MessageLiteOrBuilder#isInitialized() first to check if there are any missing fields, as that method is likely to be much faster than this one even when the message is fully-initialized.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 360 of file AbstractMessage.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Definition at line 336 of file AbstractMessage.java.
|
inline |
Definition at line 464 of file AbstractMessage.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Definition at line 330 of file AbstractMessage.java.
|
inlineprotected |
Definition at line 365 of file AbstractMessage.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.
Definition at line 573 of file AbstractMessage.java.
|
inline |
Like mergeDelimitedFrom(InputStream) but supporting extensions.
Definition at line 578 of file AbstractMessage.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).
Definition at line 535 of file AbstractMessage.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).
Definition at line 546 of file AbstractMessage.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).
Definition at line 540 of file AbstractMessage.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).
Definition at line 552 of file AbstractMessage.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).
Definition at line 523 of file AbstractMessage.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).
Definition at line 528 of file AbstractMessage.java.
|
inline |
Parses a message of this type from the input and merges it with this message.
Warning: This does not verify that all required fields are present in the input message. If you call build() without setting all required fields, it will throw an {}, which is a RuntimeException and thus might not be caught. There are a few good ways to deal with this: Call isInitialized() to verify that all required fields are set before building. Use
to build, which ignores missing required fields.
Note: The caller should call CodedInputStream#checkLastTagWas(int) after calling this to verify that the last tag seen was the appropriate end-group tag, or zero for EOF.
Definition at line 419 of file AbstractMessage.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.
Definition at line 424 of file AbstractMessage.java.
|
inline |
Parse a message of this type from
and merge it with the message being built. This is just a small wrapper around mergeFrom(CodedInputStream). Note that this method always reads the entire input (unless it throws an exception). If you want it to stop earlier, you will need to wrap your input in some wrapper stream that limits reading. Or, use MessageLite#writeDelimitedTo(OutputStream) to write your message and {} to read it. Despite usually reading the entire input, this does not close the stream.
Definition at line 562 of file AbstractMessage.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
Definition at line 567 of file AbstractMessage.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.Message.Builder.
Definition at line 370 of file AbstractMessage.java.
|
inline |
Merge some unknown fields into the UnknownFieldSet for this message.
Implements com.google.protobuf.Message.Builder.
Definition at line 451 of file AbstractMessage.java.
|
inlinestaticprotected |
Construct an UninitializedMessageException reporting missing fields in the given message.
Definition at line 475 of file AbstractMessage.java.
|
inline |
Definition at line 470 of file AbstractMessage.java.