Public Member Functions | Protected Member Functions | Private Attributes | List of all members
com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type > Class Template Reference
Inheritance diagram for com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >:
Inheritance graph
[legend]

Public Member Functions

Type getDefaultValue ()
 
Type getDefaultValue ()
 
FieldDescriptor getDescriptor ()
 
FieldDescriptor getDescriptor ()
 
WireFormat.FieldType getLiteType ()
 
WireFormat.FieldType getLiteType ()
 
Message getMessageDefaultInstance ()
 
Message getMessageDefaultInstance ()
 
int getNumber ()
 
int getNumber ()
 
void internalInit (final FieldDescriptor descriptor)
 
void internalInit (final FieldDescriptor descriptor)
 
boolean isRepeated ()
 
boolean isRepeated ()
 

Protected Member Functions

Object fromReflectionType (final Object value)
 
Object fromReflectionType (final Object value)
 
ExtensionType getExtensionType ()
 
ExtensionType getExtensionType ()
 
Object singularFromReflectionType (final Object value)
 
Object singularFromReflectionType (final Object value)
 
Object singularToReflectionType (final Object value)
 
Object singularToReflectionType (final Object value)
 
Object toReflectionType (final Object value)
 
Object toReflectionType (final Object value)
 

Private Attributes

ExtensionDescriptorRetriever descriptorRetriever
 
final Method enumGetValueDescriptor
 
final Method enumValueOf
 
final ExtensionType extensionType
 
final Message messageDefaultInstance
 
final Class singularType
 

Detailed Description

Type used to represent generated extensions. The protocol compiler generates a static singleton instance of this class for each extension.

For example, imagine you have the

.proto

file:

option java_class = "MyProto";
message Foo {
  extensions 1000 to max;
}
extend Foo {
  optional int32 bar;
}

Then,

MyProto.Foo.bar

has type

GeneratedExtension<MyProto.Foo, Integer>

.

In general, users should ignore the details of this type, and simply use these static singletons as parameters to the extension accessors defined in ExtendableMessage and ExtendableBuilder.

Definition at line 1757 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

Member Function Documentation

◆ fromReflectionType() [1/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.fromReflectionType ( final Object  value)
inlineprotected

Convert from the type used by the reflection accessors to the type used by native accessors. E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors use the generated enum type.

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

◆ fromReflectionType() [2/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.fromReflectionType ( final Object  value)
inlineprotected

Convert from the type used by the reflection accessors to the type used by native accessors. E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors use the generated enum type.

Definition at line 1852 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

◆ getDefaultValue() [1/2]

Type com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getDefaultValue ( )
inline

◆ getDefaultValue() [2/2]

Type com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getDefaultValue ( )
inline

◆ getDescriptor() [1/2]

FieldDescriptor com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getDescriptor ( )
inline

◆ getDescriptor() [2/2]

FieldDescriptor com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getDescriptor ( )
inline

◆ getExtensionType() [1/2]

ExtensionType com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getExtensionType ( )
inlineprotected

◆ getExtensionType() [2/2]

ExtensionType com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getExtensionType ( )
inlineprotected

◆ getLiteType() [1/2]

WireFormat.FieldType com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getLiteType ( )
inline

◆ getLiteType() [2/2]

WireFormat.FieldType com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getLiteType ( )
inline

◆ getMessageDefaultInstance() [1/2]

Message com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getMessageDefaultInstance ( )
inline

If the extension is an embedded message or group, returns the default instance of the message.

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

◆ getMessageDefaultInstance() [2/2]

Message com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getMessageDefaultInstance ( )
inline

If the extension is an embedded message or group, returns the default instance of the message.

Definition at line 1835 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

◆ getNumber() [1/2]

int com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getNumber ( )
inline

◆ getNumber() [2/2]

int com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.getNumber ( )
inline

◆ internalInit() [1/2]

void com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.internalInit ( final FieldDescriptor  descriptor)
inline

◆ internalInit() [2/2]

void com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.internalInit ( final FieldDescriptor  descriptor)
inline

For use by generated code only.

Definition at line 1801 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

◆ isRepeated() [1/2]

boolean com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.isRepeated ( )
inline

◆ isRepeated() [2/2]

boolean com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.isRepeated ( )
inline

◆ singularFromReflectionType() [1/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.singularFromReflectionType ( final Object  value)
inlineprotected

Like fromReflectionType(Object), but if the type is a repeated type, this converts a single element.

Definition at line 1876 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

◆ singularFromReflectionType() [2/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.singularFromReflectionType ( final Object  value)
inlineprotected

Like fromReflectionType(Object), but if the type is a repeated type, this converts a single element.

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

◆ singularToReflectionType() [1/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.singularToReflectionType ( final Object  value)
inlineprotected

Like toReflectionType(Object), but if the type is a repeated type, this converts a single element.

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

◆ singularToReflectionType() [2/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.singularToReflectionType ( final Object  value)
inlineprotected

Like toReflectionType(Object), but if the type is a repeated type, this converts a single element.

Definition at line 1924 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

◆ toReflectionType() [1/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.toReflectionType ( final Object  value)
inlineprotected

Convert from the type used by the native accessors to the type used by reflection accessors. E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors use the generated enum type.

Definition at line 1901 of file protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java.

◆ toReflectionType() [2/2]

Object com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.toReflectionType ( final Object  value)
inlineprotected

Convert from the type used by the native accessors to the type used by reflection accessors. E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors use the generated enum type.

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

Member Data Documentation

◆ descriptorRetriever

ExtensionDescriptorRetriever com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.descriptorRetriever
private

◆ enumGetValueDescriptor

final Method com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.enumGetValueDescriptor
private

◆ enumValueOf

final Method com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.enumValueOf
private

◆ extensionType

final ExtensionType com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.extensionType
private

◆ messageDefaultInstance

final Message com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.messageDefaultInstance
private

◆ singularType

final Class com.google.protobuf.GeneratedMessage.GeneratedExtension< ContainingType extends Message, Type >.singularType
private

The documentation for this class was generated from the following file:


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