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

Classes

class  Builder
 

Public Member Functions

 AbstractMessageWrapper (Message wrappedMessage)
 
 AbstractMessageWrapper (Message wrappedMessage)
 
Map< Descriptors.FieldDescriptor, Object > getAllFields ()
 
Map< Descriptors.FieldDescriptor, Object > getAllFields ()
 
AbstractMessageWrapper getDefaultInstanceForType ()
 
AbstractMessageWrapper getDefaultInstanceForType ()
 
Descriptors.Descriptor getDescriptorForType ()
 
Descriptors.Descriptor getDescriptorForType ()
 
Object getField (Descriptors.FieldDescriptor field)
 
Object getField (Descriptors.FieldDescriptor field)
 
Parser<? extends MessagegetParserForType ()
 
Parser<? extends MessagegetParserForType ()
 
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)
 
Builder newBuilderForType ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
Builder toBuilder ()
 
- Public Member Functions inherited from com.google.protobuf.AbstractMessage
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.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
Descriptors.FieldDescriptor getOneofFieldDescriptor (Descriptors.OneofDescriptor oneof)
 
Descriptors.FieldDescriptor getOneofFieldDescriptor (Descriptors.OneofDescriptor oneof)
 
boolean hasOneof (Descriptors.OneofDescriptor oneof)
 
boolean hasOneof (Descriptors.OneofDescriptor oneof)
 

Private Attributes

final Message wrappedMessage
 

Additional Inherited Members

- Protected Member Functions inherited from com.google.protobuf.AbstractMessage
Message.Builder newBuilderForType (BuilderParent parent)
 
Message.Builder newBuilderForType (BuilderParent parent)
 
- Static Protected Member Functions inherited from com.google.protobuf.AbstractMessage
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 inherited from com.google.protobuf.AbstractMessage
int memoizedSize = -1
 

Detailed Description

Extends AbstractMessage and wraps some other message object. The methods of the Message interface which aren't explicitly implemented by AbstractMessage are forwarded to the wrapped object. This allows us to test that AbstractMessage's implementations work even if the wrapped object does not use them.

Definition at line 61 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

Constructor & Destructor Documentation

◆ AbstractMessageWrapper() [1/2]

com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.AbstractMessageWrapper ( Message  wrappedMessage)
inline

◆ AbstractMessageWrapper() [2/2]

com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.AbstractMessageWrapper ( Message  wrappedMessage)
inline

Member Function Documentation

◆ getAllFields() [1/2]

Map<Descriptors.FieldDescriptor, Object> com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getAllFields ( )
inline

Returns a collection of all the fields in this message which are set and their corresponding values. A singular ("required" or "optional") field is set iff hasField() returns true for that field. A "repeated" field is set iff getRepeatedFieldCount() is greater than zero. The values are exactly what would be returned by calling getField(Descriptors.FieldDescriptor) for each field. The map is guaranteed to be a sorted map, so iterating over it will return fields in order by field number.
If this is for a builder, the returned map may or may not reflect future changes to the builder. Either way, the returned map is itself unmodifiable.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 79 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getAllFields() [2/2]

Map<Descriptors.FieldDescriptor, Object> com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getAllFields ( )
inline

Returns a collection of all the fields in this message which are set and their corresponding values. A singular ("required" or "optional") field is set iff hasField() returns true for that field. A "repeated" field is set iff getRepeatedFieldCount() is greater than zero. The values are exactly what would be returned by calling getField(Descriptors.FieldDescriptor) for each field. The map is guaranteed to be a sorted map, so iterating over it will return fields in order by field number.
If this is for a builder, the returned map may or may not reflect future changes to the builder. Either way, the returned map is itself unmodifiable.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 80 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getDefaultInstanceForType() [1/2]

AbstractMessageWrapper com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getDefaultInstanceForType ( )
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

getDefaultInstance()

method of generated message classes in that this method is an abstract method of the

interface whereas

getDefaultInstance()

is a static method of a specific class. They return the same thing.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 74 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getDefaultInstanceForType() [2/2]

AbstractMessageWrapper com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getDefaultInstanceForType ( )
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

getDefaultInstance()

method of generated message classes in that this method is an abstract method of the

interface whereas

getDefaultInstance()

is a static method of a specific class. They return the same thing.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 75 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getDescriptorForType() [1/2]

Descriptors.Descriptor com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getDescriptorForType ( )
inline

Get the message's type's descriptor. This differs from the

getDescriptor()

method of generated message classes in that this method is an abstract method of the

interface whereas

getDescriptor()

is a static method of a specific class. They return the same thing.

Implements com.google.protobuf.MessageOrBuilder.

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

◆ getDescriptorForType() [2/2]

Descriptors.Descriptor com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getDescriptorForType ( )
inline

Get the message's type's descriptor. This differs from the

getDescriptor()

method of generated message classes in that this method is an abstract method of the

interface whereas

getDescriptor()

is a static method of a specific class. They return the same thing.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 70 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getField() [1/2]

Object com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getField ( Descriptors.FieldDescriptor  field)
inline

Obtains the value of the given field, or the default value if it is not set. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned. For repeated fields, a java.util.List is returned.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 89 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getField() [2/2]

Object com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getField ( Descriptors.FieldDescriptor  field)
inline

Obtains the value of the given field, or the default value if it is not set. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned. For repeated fields, a java.util.List is returned.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 90 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getParserForType() [1/2]

Parser<? extends Message> com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getParserForType ( )
inline

Gets the parser for a message of the same type as this message.

Implements com.google.protobuf.Message.

Definition at line 227 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getParserForType() [2/2]

Parser<? extends Message> com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getParserForType ( )
inline

Gets the parser for a message of the same type as this message.

Implements com.google.protobuf.Message.

Definition at line 228 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getRepeatedField() [1/2]

Object com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getRepeatedField ( Descriptors.FieldDescriptor  field,
int  index 
)
inline

Gets an element of a repeated field. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned.

Exceptions
IllegalArgumentExceptionThe field is not a repeated field, or
field.getContainingType() != getDescriptorForType()
.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 99 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getRepeatedField() [2/2]

Object com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getRepeatedField ( Descriptors.FieldDescriptor  field,
int  index 
)
inline

Gets an element of a repeated field. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned.

Exceptions
IllegalArgumentExceptionThe field is not a repeated field, or
field.getContainingType() != getDescriptorForType()
.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 100 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getRepeatedFieldCount() [1/2]

int com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getRepeatedFieldCount ( Descriptors.FieldDescriptor  field)
inline

Gets the number of elements of a repeated field. This is exactly equivalent to calling the generated "Count" accessor method corresponding to the field.

Exceptions
IllegalArgumentExceptionThe field is not a repeated field, or
field.getContainingType() != getDescriptorForType()
.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 94 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getRepeatedFieldCount() [2/2]

int com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getRepeatedFieldCount ( Descriptors.FieldDescriptor  field)
inline

Gets the number of elements of a repeated field. This is exactly equivalent to calling the generated "Count" accessor method corresponding to the field.

Exceptions
IllegalArgumentExceptionThe field is not a repeated field, or
field.getContainingType() != getDescriptorForType()
.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 95 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ getUnknownFields() [1/2]

UnknownFieldSet com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getUnknownFields ( )
inline

◆ getUnknownFields() [2/2]

UnknownFieldSet com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getUnknownFields ( )
inline

◆ hasField() [1/2]

boolean com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.hasField ( Descriptors.FieldDescriptor  field)
inline

Returns true if the given field is set. This is exactly equivalent to calling the generated "has" accessor method corresponding to the field.

Exceptions
IllegalArgumentExceptionThe field is a repeated field, or
field.getContainingType() != getDescriptorForType()
.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 84 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ hasField() [2/2]

boolean com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.hasField ( Descriptors.FieldDescriptor  field)
inline

Returns true if the given field is set. This is exactly equivalent to calling the generated "has" accessor method corresponding to the field.

Exceptions
IllegalArgumentExceptionThe field is a repeated field, or
field.getContainingType() != getDescriptorForType()
.

Implements com.google.protobuf.MessageOrBuilder.

Definition at line 85 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ newBuilderForType() [1/2]

Builder com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.newBuilderForType ( )
inline

Constructs a new builder for a message of the same type as this message.

Implements com.google.protobuf.Message.

Definition at line 109 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ newBuilderForType() [2/2]

Builder com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.newBuilderForType ( )
inline

Constructs a new builder for a message of the same type as this message.

Implements com.google.protobuf.Message.

Definition at line 110 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ toBuilder() [1/2]

Builder com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.toBuilder ( )
inline

Constructs a builder initialized with the current message. Use this to derive a new message from the current one.

Implements com.google.protobuf.Message.

Definition at line 114 of file bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

◆ toBuilder() [2/2]

Builder com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.toBuilder ( )
inline

Constructs a builder initialized with the current message. Use this to derive a new message from the current one.

Implements com.google.protobuf.Message.

Definition at line 115 of file protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java.

Member Data Documentation

◆ wrappedMessage

final Message com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.wrappedMessage
private

The documentation for this class was generated from the following file:
grpc::protobuf::MessageLite
GRPC_CUSTOM_MESSAGELITE MessageLite
Definition: include/grpcpp/impl/codegen/config_protobuf.h:79
com.google.protobuf.AbstractMessageTest.AbstractMessageWrapper.getDescriptorForType
Descriptors.Descriptor getDescriptorForType()
Definition: bloaty/third_party/protobuf/java/core/src/test/java/com/google/protobuf/AbstractMessageTest.java:69
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
Message
Definition: protobuf/php/ext/google/protobuf/message.c:53


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