Package akka.protobuf
Class GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type>
- java.lang.Object
-
- akka.protobuf.GeneratedMessage.GeneratedExtension<ContainingType,Type>
-
- Enclosing class:
- GeneratedMessage
public static final class GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type> extends java.lang.ObjectType 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
.protofile:option java_class = "MyProto"; message Foo { extensions 1000 to max; } extend Foo { optional int32 bar; }Then,
MyProto.Foo.barhas typeGeneratedExtension<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.ExtendableMessageandGeneratedMessage.ExtendableBuilder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Descriptors.FieldDescriptorgetDescriptor()MessagegetMessageDefaultInstance()If the extension is an embedded message or group, returns the default instance of the message.voidinternalInit(Descriptors.FieldDescriptor descriptor)For use by generated code only.
-
-
-
Method Detail
-
internalInit
public void internalInit(Descriptors.FieldDescriptor descriptor)
For use by generated code only.
-
getDescriptor
public Descriptors.FieldDescriptor getDescriptor()
-
getMessageDefaultInstance
public Message getMessageDefaultInstance()
If the extension is an embedded message or group, returns the default instance of the message.
-
-