Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.google.protobuf.UninitializedMessageException Class Reference
Inheritance diagram for com.google.protobuf.UninitializedMessageException:
Inheritance graph
[legend]

Public Member Functions

InvalidProtocolBufferException asInvalidProtocolBufferException ()
 
InvalidProtocolBufferException asInvalidProtocolBufferException ()
 
List< String > getMissingFields ()
 
List< String > getMissingFields ()
 
 UninitializedMessageException (final List< String > missingFields)
 
 UninitializedMessageException (final List< String > missingFields)
 
 UninitializedMessageException (final MessageLite message)
 
 UninitializedMessageException (final MessageLite message)
 

Static Private Member Functions

static String buildDescription (final List< String > missingFields)
 
static String buildDescription (final List< String > missingFields)
 

Private Attributes

final List< String > missingFields
 

Static Private Attributes

static final long serialVersionUID = -7466929953374883507L
 

Detailed Description

Thrown when attempting to build a protocol message that is missing required fields. This is a

RuntimeException

because it normally represents a programming error: it happens when some code which constructs a message fails to set all the fields.

parseFrom()

methods do not throw this; they throw an InvalidProtocolBufferException if required fields are missing, because it is not a programming error to receive an incomplete message. In other words,

should never be thrown by correct code, but

InvalidProtocolBufferException

might be.

Author
kento.nosp@m.n@go.nosp@m.ogle..nosp@m.com Kenton Varda

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

Constructor & Destructor Documentation

◆ UninitializedMessageException() [1/4]

com.google.protobuf.UninitializedMessageException.UninitializedMessageException ( final MessageLite  message)
inline

◆ UninitializedMessageException() [2/4]

com.google.protobuf.UninitializedMessageException.UninitializedMessageException ( final List< String >  missingFields)
inline

◆ UninitializedMessageException() [3/4]

com.google.protobuf.UninitializedMessageException.UninitializedMessageException ( final MessageLite  message)
inline

◆ UninitializedMessageException() [4/4]

com.google.protobuf.UninitializedMessageException.UninitializedMessageException ( final List< String >  missingFields)
inline

Member Function Documentation

◆ asInvalidProtocolBufferException() [1/2]

InvalidProtocolBufferException com.google.protobuf.UninitializedMessageException.asInvalidProtocolBufferException ( )
inline

Converts this exception to an InvalidProtocolBufferException. When a parsed message is missing required fields, this should be thrown instead of

.

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

◆ asInvalidProtocolBufferException() [2/2]

InvalidProtocolBufferException com.google.protobuf.UninitializedMessageException.asInvalidProtocolBufferException ( )
inline

Converts this exception to an InvalidProtocolBufferException. When a parsed message is missing required fields, this should be thrown instead of

.

Definition at line 78 of file protobuf/java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java.

◆ buildDescription() [1/2]

static String com.google.protobuf.UninitializedMessageException.buildDescription ( final List< String >  missingFields)
inlinestaticprivate

Construct the description string for this exception.

Definition at line 83 of file protobuf/java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java.

◆ buildDescription() [2/2]

static String com.google.protobuf.UninitializedMessageException.buildDescription ( final List< String >  missingFields)
inlinestaticprivate

Construct the description string for this exception.

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

◆ getMissingFields() [1/2]

List<String> com.google.protobuf.UninitializedMessageException.getMissingFields ( )
inline

Get a list of human-readable names of required fields missing from this message. Each name is a full path to a field, e.g. "foo.bar[5].baz". Returns null if the lite runtime was used, since it lacks the ability to find missing fields.

Definition at line 69 of file protobuf/java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java.

◆ getMissingFields() [2/2]

List<String> com.google.protobuf.UninitializedMessageException.getMissingFields ( )
inline

Get a list of human-readable names of required fields missing from this message. Each name is a full path to a field, e.g. "foo.bar[5].baz". Returns null if the lite runtime was used, since it lacks the ability to find missing fields.

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

Member Data Documentation

◆ missingFields

final List< String > com.google.protobuf.UninitializedMessageException.missingFields
private

◆ serialVersionUID

static final long com.google.protobuf.UninitializedMessageException.serialVersionUID = -7466929953374883507L
staticprivate

The documentation for this class was generated from the following file:
com.google.protobuf.UninitializedMessageException.UninitializedMessageException
UninitializedMessageException(final MessageLite message)
Definition: bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/UninitializedMessageException.java:50


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