Classes
com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage > Class Template Referenceabstract

Classes

class  ExtensionWriter
 

Detailed Description

Generated message classes for message types that contain extension ranges subclass this.

This class implements type-safe accessors for extensions. They implement all the same operations that you can do with normal fields – e.g. "has", "get", and "getCount" – but for extensions. The extensions are identified using instances of the class GeneratedExtension; the protocol compiler generates a static instance of this class for every extension in its input. Through the magic of generics, all is made type-safe.

For example, imagine you have the

.proto

file:

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

Then you might write code like:

MyProto.Foo foo = getFoo();
int i = foo.getExtension(MyProto.bar);

See also ExtendableBuilder.

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


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


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