Public Member Functions | List of all members
com.google.protobuf.MessageLite.Builder Interface Reference
Inheritance diagram for com.google.protobuf.MessageLite.Builder:
Inheritance graph
[legend]

Public Member Functions

MessageLite build ()
 
MessageLite build ()
 
MessageLite buildPartial ()
 
MessageLite buildPartial ()
 
Builder clear ()
 
Builder clear ()
 
Builder clone ()
 
Builder clone ()
 
boolean mergeDelimitedFrom (InputStream input) throws IOException
 
boolean mergeDelimitedFrom (InputStream input) throws IOException
 
boolean mergeDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
boolean mergeDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
Builder mergeFrom (byte[] data) throws InvalidProtocolBufferException
 
Builder mergeFrom (byte[] data) throws InvalidProtocolBufferException
 
Builder mergeFrom (byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
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) throws InvalidProtocolBufferException
 
Builder mergeFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
Builder mergeFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
Builder mergeFrom (ByteString data) throws InvalidProtocolBufferException
 
Builder mergeFrom (ByteString data) throws InvalidProtocolBufferException
 
Builder mergeFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
Builder mergeFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
Builder mergeFrom (CodedInputStream input) throws IOException
 
Builder mergeFrom (CodedInputStream input) throws IOException
 
Builder mergeFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
Builder mergeFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
Builder mergeFrom (InputStream input) throws IOException
 
Builder mergeFrom (InputStream input) throws IOException
 
Builder mergeFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
Builder mergeFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
 
Builder mergeFrom (MessageLite other)
 
Builder mergeFrom (MessageLite other)
 
- Public Member Functions inherited from com.google.protobuf.MessageLiteOrBuilder
MessageLite getDefaultInstanceForType ()
 
MessageLite getDefaultInstanceForType ()
 
boolean isInitialized ()
 
boolean isInitialized ()
 

Detailed Description

Abstract interface implemented by Protocol Message builders.

Definition at line 133 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/MessageLite.java.

Member Function Documentation

◆ build() [1/2]

MessageLite com.google.protobuf.MessageLite.Builder.build ( )

Constructs the message based on the state of the Builder. Subsequent changes to the Builder will not affect the returned message.

Exceptions
UninitializedMessageExceptionThe message is missing one or more required fields (i.e. isInitialized() returns false). Use buildPartial() to bypass this check.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, and com.google.protobuf.Message.Builder.

◆ build() [2/2]

MessageLite com.google.protobuf.MessageLite.Builder.build ( )

Constructs the message based on the state of the Builder. Subsequent changes to the Builder will not affect the returned message.

Exceptions
UninitializedMessageExceptionThe message is missing one or more required fields (i.e. isInitialized() returns false). Use buildPartial() to bypass this check.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, and com.google.protobuf.Message.Builder.

◆ buildPartial() [1/2]

MessageLite com.google.protobuf.MessageLite.Builder.buildPartial ( )

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.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, and com.google.protobuf.Message.Builder.

◆ buildPartial() [2/2]

MessageLite com.google.protobuf.MessageLite.Builder.buildPartial ( )

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.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, and com.google.protobuf.Message.Builder.

◆ clear() [1/2]

Builder com.google.protobuf.MessageLite.Builder.clear ( )

◆ clear() [2/2]

Builder com.google.protobuf.MessageLite.Builder.clear ( )

◆ clone() [1/2]

Builder com.google.protobuf.MessageLite.Builder.clone ( )

◆ clone() [2/2]

Builder com.google.protobuf.MessageLite.Builder.clone ( )

◆ mergeDelimitedFrom() [1/4]

boolean com.google.protobuf.MessageLite.Builder.mergeDelimitedFrom ( InputStream  input) throws IOException

◆ mergeDelimitedFrom() [2/4]

boolean com.google.protobuf.MessageLite.Builder.mergeDelimitedFrom ( InputStream  input) throws IOException

◆ mergeDelimitedFrom() [3/4]

boolean com.google.protobuf.MessageLite.Builder.mergeDelimitedFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException

◆ mergeDelimitedFrom() [4/4]

boolean com.google.protobuf.MessageLite.Builder.mergeDelimitedFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException

◆ mergeFrom() [1/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data) throws InvalidProtocolBufferException

◆ mergeFrom() [2/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data) throws InvalidProtocolBufferException

◆ mergeFrom() [3/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ mergeFrom() [4/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ mergeFrom() [5/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data,
int  off,
int  len 
) throws InvalidProtocolBufferException

◆ mergeFrom() [6/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data,
int  off,
int  len 
) throws InvalidProtocolBufferException

◆ mergeFrom() [7/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data,
int  off,
int  len,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ mergeFrom() [8/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( byte[]  data,
int  off,
int  len,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ mergeFrom() [9/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( ByteString  data) throws InvalidProtocolBufferException

◆ mergeFrom() [10/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( ByteString  data) throws InvalidProtocolBufferException

◆ mergeFrom() [11/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( ByteString  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ mergeFrom() [12/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( ByteString  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException

◆ mergeFrom() [13/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( CodedInputStream  input) throws IOException

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.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, and com.google.protobuf.Message.Builder.

◆ mergeFrom() [14/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( CodedInputStream  input) throws IOException

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.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, and com.google.protobuf.Message.Builder.

◆ mergeFrom() [15/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( CodedInputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException

◆ mergeFrom() [16/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( CodedInputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException

◆ mergeFrom() [17/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( InputStream  input) throws IOException

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.

Returns
this

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, com.google.protobuf.Message.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, and com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >.

◆ mergeFrom() [18/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( InputStream  input) throws IOException

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.

Returns
this

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.Message.Builder, com.google.protobuf.Message.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessage.Builder< BuilderType extends Builder< BuilderType >, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, and com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >.

◆ mergeFrom() [19/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException

◆ mergeFrom() [20/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws IOException

◆ mergeFrom() [21/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( MessageLite  other)

Merge

other

into the message being built.

other

must have the exact same type as

this

(i.e.

getClass().equals(getDefaultInstanceForType().getClass())

).

Merging occurs as follows. For each field:

  • For singular primitive fields, if the field is set in
    other
    , then
    other
    's value overwrites the value in this message.
  • For singular message fields, if the field is set in
    other
    , it is merged into the corresponding sub-message of this message using the same merging rules.
  • For repeated fields, the elements in
    other
    are concatenated with the elements in this message. * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

This is equivalent to the

method in C++.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, and com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >.

◆ mergeFrom() [22/22]

Builder com.google.protobuf.MessageLite.Builder.mergeFrom ( MessageLite  other)

Merge

other

into the message being built.

other

must have the exact same type as

this

(i.e.

getClass().equals(getDefaultInstanceForType().getClass())

).

Merging occurs as follows. For each field:

  • For singular primitive fields, if the field is set in
    other
    , then
    other
    's value overwrites the value in this message.
  • For singular message fields, if the field is set in
    other
    , it is merged into the corresponding sub-message of this message using the same merging rules.
  • For repeated fields, the elements in
    other
    are concatenated with the elements in this message. * For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

This is equivalent to the

method in C++.

Implemented in com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.UnknownFieldSet.Builder, com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >, and com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >.Builder< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends Builder< MessageType, BuilderType >.


The documentation for this interface was generated from the following file:
google::protobuf.internal.python_message.MergeFrom
MergeFrom
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1339
com.google.protobuf.MessageLite.Builder.buildPartial
MessageLite buildPartial()
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
com.google.protobuf.MessageLiteOrBuilder.getDefaultInstanceForType
MessageLite getDefaultInstanceForType()
input
std::string input
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:197


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:07