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

Classes

class  Builder
 
class  Builder
 
interface  BuilderParent
 

Public Member Functions

boolean equals (final Object other)
 
boolean equals (final Object other)
 
List< String > findInitializationErrors ()
 
List< String > findInitializationErrors ()
 
String getInitializationErrorString ()
 
String getInitializationErrorString ()
 
FieldDescriptor getOneofFieldDescriptor (OneofDescriptor oneof)
 
FieldDescriptor getOneofFieldDescriptor (OneofDescriptor oneof)
 
int getSerializedSize ()
 
int getSerializedSize ()
 
int hashCode ()
 
int hashCode ()
 
boolean hasOneof (OneofDescriptor oneof)
 
boolean hasOneof (OneofDescriptor oneof)
 
boolean isInitialized ()
 
boolean isInitialized ()
 
final String toString ()
 
final String toString ()
 
void writeTo (final CodedOutputStream output) throws IOException
 
void writeTo (final CodedOutputStream output) throws IOException
 
- Public Member Functions inherited from com.google.protobuf.Message
Parser<? extends MessagegetParserForType ()
 
Parser<? extends MessagegetParserForType ()
 
Builder newBuilderForType ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
Builder toBuilder ()
 
- Public Member Functions inherited from com.google.protobuf.MessageLite
byte[] toByteArray ()
 
byte[] toByteArray ()
 
ByteString toByteString ()
 
ByteString toByteString ()
 
void writeDelimitedTo (OutputStream output) throws IOException
 
void writeDelimitedTo (OutputStream output) throws IOException
 
void writeTo (OutputStream output) throws IOException
 
void writeTo (OutputStream output) throws IOException
 
- Public Member Functions inherited from com.google.protobuf.MessageOrBuilder
Map< Descriptors.FieldDescriptor, Object > getAllFields ()
 
Map< Descriptors.FieldDescriptor, Object > getAllFields ()
 
Message getDefaultInstanceForType ()
 
Message getDefaultInstanceForType ()
 
Descriptors.Descriptor getDescriptorForType ()
 
Descriptors.Descriptor getDescriptorForType ()
 
Object getField (Descriptors.FieldDescriptor field)
 
Object getField (Descriptors.FieldDescriptor field)
 
Descriptors.FieldDescriptor getOneofFieldDescriptor (Descriptors.OneofDescriptor oneof)
 
Descriptors.FieldDescriptor getOneofFieldDescriptor (Descriptors.OneofDescriptor oneof)
 
Object getRepeatedField (Descriptors.FieldDescriptor field, int index)
 
Object getRepeatedField (Descriptors.FieldDescriptor field, int index)
 
int getRepeatedFieldCount (Descriptors.FieldDescriptor field)
 
int getRepeatedFieldCount (Descriptors.FieldDescriptor field)
 
UnknownFieldSet getUnknownFields ()
 
UnknownFieldSet getUnknownFields ()
 
boolean hasField (Descriptors.FieldDescriptor field)
 
boolean hasField (Descriptors.FieldDescriptor field)
 
boolean hasOneof (Descriptors.OneofDescriptor oneof)
 
boolean hasOneof (Descriptors.OneofDescriptor oneof)
 

Protected Member Functions

Message.Builder newBuilderForType (BuilderParent parent)
 
Message.Builder newBuilderForType (BuilderParent parent)
 

Static Protected Member Functions

static int hashBoolean (boolean b)
 
static int hashBoolean (boolean b)
 
static int hashEnum (EnumLite e)
 
static int hashEnum (EnumLite e)
 
static int hashEnumList (List<? extends EnumLite > list)
 
static int hashEnumList (List<? extends EnumLite > list)
 
static int hashFields (int hash, Map< FieldDescriptor, Object > map)
 
static int hashFields (int hash, Map< FieldDescriptor, Object > map)
 
static int hashLong (long n)
 
static int hashLong (long n)
 

Protected Attributes

int memoizedSize = -1
 

Static Private Member Functions

static boolean compareBytes (Object a, Object b)
 
static boolean compareBytes (Object a, Object b)
 
static boolean compareMapField (Object a, Object b)
 
static boolean compareMapField (Object a, Object b)
 
static Map convertMapEntryListToMap (List list)
 
static Map convertMapEntryListToMap (List list)
 
static int hashMapField (Object value)
 
static int hashMapField (Object value)
 
static ByteString toByteString (Object value)
 
static ByteString toByteString (Object value)
 

Detailed Description

A partial implementation of the Message interface which implements as many methods of that interface as possible in terms of other methods.

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

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

Member Function Documentation

◆ compareBytes() [1/2]

static boolean com.google.protobuf.AbstractMessage.compareBytes ( Object  a,
Object  b 
)
inlinestaticprivate

Compares two bytes fields. The parameters must be either a byte array or a ByteString object. They can be of different type though.

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

◆ compareBytes() [2/2]

static boolean com.google.protobuf.AbstractMessage.compareBytes ( Object  a,
Object  b 
)
inlinestaticprivate

Compares two bytes fields. The parameters must be either a byte array or a ByteString object. They can be of different type though.

Definition at line 183 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ compareMapField() [1/2]

static boolean com.google.protobuf.AbstractMessage.compareMapField ( Object  a,
Object  b 
)
inlinestaticprivate

Compares two map fields. The parameters must be a list of MapEntry messages.

Definition at line 220 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ compareMapField() [2/2]

static boolean com.google.protobuf.AbstractMessage.compareMapField ( Object  a,
Object  b 
)
inlinestaticprivate

Compares two map fields. The parameters must be a list of MapEntry messages.

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

◆ convertMapEntryListToMap() [1/2]

static Map com.google.protobuf.AbstractMessage.convertMapEntryListToMap ( List  list)
inlinestaticprivate

Converts a list of MapEntry messages into a Map used for equals() and hashCode().

Definition at line 192 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ convertMapEntryListToMap() [2/2]

static Map com.google.protobuf.AbstractMessage.convertMapEntryListToMap ( List  list)
inlinestaticprivate

Converts a list of MapEntry messages into a Map used for equals() and hashCode().

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

◆ equals() [1/2]

boolean com.google.protobuf.AbstractMessage.equals ( final Object  other)
inline

Compares the specified object with this message for equality. Returns

true

if the given object is a message of the same type (as defined by

) and has identical values for all of its fields. Subclasses must implement this; inheriting

Object.equals()

is incorrect.

Parameters
otherobject to be compared for equality with this message
Returns
true
if the specified object is equal to this message

Implements com.google.protobuf.Message.

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

◆ equals() [2/2]

boolean com.google.protobuf.AbstractMessage.equals ( final Object  other)
inline

Compares the specified object with this message for equality. Returns

true

if the given object is a message of the same type (as defined by

) and has identical values for all of its fields. Subclasses must implement this; inheriting

Object.equals()

is incorrect.

Parameters
otherobject to be compared for equality with this message
Returns
true
if the specified object is equal to this message

Implements com.google.protobuf.Message.

Definition at line 143 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ findInitializationErrors() [1/2]

List<String> com.google.protobuf.AbstractMessage.findInitializationErrors ( )
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 88 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ findInitializationErrors() [2/2]

List<String> com.google.protobuf.AbstractMessage.findInitializationErrors ( )
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 88 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ getInitializationErrorString() [1/2]

String com.google.protobuf.AbstractMessage.getInitializationErrorString ( )
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 93 of file bloaty/third_party/protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ getInitializationErrorString() [2/2]

String com.google.protobuf.AbstractMessage.getInitializationErrorString ( )
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 93 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ getOneofFieldDescriptor() [1/2]

FieldDescriptor com.google.protobuf.AbstractMessage.getOneofFieldDescriptor ( OneofDescriptor  oneof)
inline

◆ getOneofFieldDescriptor() [2/2]

FieldDescriptor com.google.protobuf.AbstractMessage.getOneofFieldDescriptor ( OneofDescriptor  oneof)
inline

◆ getSerializedSize() [1/2]

int com.google.protobuf.AbstractMessage.getSerializedSize ( )
inline

◆ getSerializedSize() [2/2]

int com.google.protobuf.AbstractMessage.getSerializedSize ( )
inline

◆ hashBoolean() [1/2]

static int com.google.protobuf.AbstractMessage.hashBoolean ( boolean  b)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

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

◆ hashBoolean() [2/2]

static int com.google.protobuf.AbstractMessage.hashBoolean ( boolean  b)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

Definition at line 598 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hashCode() [1/2]

int com.google.protobuf.AbstractMessage.hashCode ( )
inline

Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting

Object.hashCode()

is incorrect.

Returns
the hash code value for this message
See also
Map::hashCode()

Implements com.google.protobuf.Message.

Definition at line 159 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hashCode() [2/2]

int com.google.protobuf.AbstractMessage.hashCode ( )
inline

Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting

Object.hashCode()

is incorrect.

Returns
the hash code value for this message
See also
Map::hashCode()

Implements com.google.protobuf.Message.

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

◆ hashEnum() [1/2]

static int com.google.protobuf.AbstractMessage.hashEnum ( EnumLite  e)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

Definition at line 607 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hashEnum() [2/2]

static int com.google.protobuf.AbstractMessage.hashEnum ( EnumLite  e)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

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

◆ hashEnumList() [1/2]

static int com.google.protobuf.AbstractMessage.hashEnumList ( List<? extends EnumLite list)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

Definition at line 616 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hashEnumList() [2/2]

static int com.google.protobuf.AbstractMessage.hashEnumList ( List<? extends EnumLite list)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

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

◆ hashFields() [1/2]

static int com.google.protobuf.AbstractMessage.hashFields ( int  hash,
Map< FieldDescriptor, Object >  map 
)
inlinestaticprotected

Get a hash code for given fields and values, using the given seed.

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

◆ hashFields() [2/2]

static int com.google.protobuf.AbstractMessage.hashFields ( int  hash,
Map< FieldDescriptor, Object >  map 
)
inlinestaticprotected

Get a hash code for given fields and values, using the given seed.

Definition at line 283 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hashLong() [1/2]

static int com.google.protobuf.AbstractMessage.hashLong ( long  n)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

Definition at line 589 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hashLong() [2/2]

static int com.google.protobuf.AbstractMessage.hashLong ( long  n)
inlinestaticprotected
Deprecated:
from v3.0.0-beta-3+, for compatibility with v2.5.0 and v2.6.1 generated code.

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

◆ hashMapField() [1/2]

static int com.google.protobuf.AbstractMessage.hashMapField ( Object  value)
inlinestaticprivate

Calculates the hash code of a map field.

must be a list of MapEntry messages.

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

◆ hashMapField() [2/2]

static int com.google.protobuf.AbstractMessage.hashMapField ( Object  value)
inlinestaticprivate

Calculates the hash code of a map field.

must be a list of MapEntry messages.

Definition at line 277 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ hasOneof() [1/2]

boolean com.google.protobuf.AbstractMessage.hasOneof ( OneofDescriptor  oneof)
inline

◆ hasOneof() [2/2]

boolean com.google.protobuf.AbstractMessage.hasOneof ( OneofDescriptor  oneof)
inline

◆ isInitialized() [1/2]

boolean com.google.protobuf.AbstractMessage.isInitialized ( )
inline

◆ isInitialized() [2/2]

boolean com.google.protobuf.AbstractMessage.isInitialized ( )
inline

◆ newBuilderForType() [1/2]

Message.Builder com.google.protobuf.AbstractMessage.newBuilderForType ( BuilderParent  parent)
inlineprotected

Create a nested builder.

Definition at line 82 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ newBuilderForType() [2/2]

Message.Builder com.google.protobuf.AbstractMessage.newBuilderForType ( BuilderParent  parent)
inlineprotected

◆ toByteString() [1/2]

static ByteString com.google.protobuf.AbstractMessage.toByteString ( Object  value)
inlinestaticprivate

◆ toByteString() [2/2]

static ByteString com.google.protobuf.AbstractMessage.toByteString ( Object  value)
inlinestaticprivate

◆ toString() [1/2]

final String com.google.protobuf.AbstractMessage.toString ( )
inline

Converts the message to a string in protocol buffer text format. This is just a trivial wrapper around TextFormat.Printer#printToString(MessageOrBuilder).

Implements com.google.protobuf.Message.

Definition at line 110 of file protobuf/java/core/src/main/java/com/google/protobuf/AbstractMessage.java.

◆ toString() [2/2]

final String com.google.protobuf.AbstractMessage.toString ( )
inline

Converts the message to a string in protocol buffer text format. This is just a trivial wrapper around TextFormat.Printer#printToString(MessageOrBuilder).

Implements com.google.protobuf.Message.

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

◆ writeTo() [1/2]

void com.google.protobuf.AbstractMessage.writeTo ( final CodedOutputStream  output) throws IOException
inline

◆ writeTo() [2/2]

void com.google.protobuf.AbstractMessage.writeTo ( final CodedOutputStream  output) throws IOException
inline

Member Data Documentation

◆ memoizedSize

int com.google.protobuf.AbstractMessage.memoizedSize = -1
protected

The documentation for this class was generated from the following file:
com.google.protobuf.MessageOrBuilder.getDescriptorForType
Descriptors.Descriptor getDescriptorForType()
gmock_output_test.output
output
Definition: bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
value
const char * value
Definition: hpack_parser_table.cc:165


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