Class GeneratedMessage.GeneratedExtension<ContainingT extends Message,T>

java.lang.Object
com.google.protobuf.ExtensionLite<ContainingT,T>
com.google.protobuf.Extension<ContainingT,T>
com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT,T>
Enclosing class:
GeneratedMessage

public static class GeneratedMessage.GeneratedExtension<ContainingT extends Message,T> extends Extension<ContainingT,T>
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 GeneratedMessage.ExtendableMessage and GeneratedMessage.ExtendableBuilder.