Package com.google.protobuf
Class Extension<ContainingType extends com.google.protobuf.MessageLite,Type>
java.lang.Object
com.google.protobuf.ExtensionLite<ContainingType,Type>
com.google.protobuf.Extension<ContainingType,Type>
- Direct Known Subclasses:
GeneratedMessage.GeneratedExtension
public abstract class Extension<ContainingType extends com.google.protobuf.MessageLite,Type>
extends com.google.protobuf.ExtensionLite<ContainingType,Type>
Interface that generated extensions implement.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
The API type that the extension is used for.static enum
Type of a message extension. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
fromReflectionType
(Object value) abstract Descriptors.FieldDescriptor
Returns the descriptor of the extension.protected abstract Extension.ExtensionType
abstract Message
Overridden to returnMessage
instead ofMessageLite
.If the extension is a message extension (i.e., getLiteType() == MESSAGE), returns the type of the message, otherwise undefined.protected abstract Object
singularFromReflectionType
(Object value) protected abstract Object
singularToReflectionType
(Object value) protected abstract Object
toReflectionType
(Object value) Methods inherited from class com.google.protobuf.ExtensionLite
getDefaultValue, getLiteType, getNumber, isRepeated
-
Constructor Details
-
Extension
public Extension()
-
-
Method Details
-
getMessageDefaultInstance
Overridden to returnMessage
instead ofMessageLite
.- Specified by:
getMessageDefaultInstance
in classcom.google.protobuf.ExtensionLite<ContainingType extends com.google.protobuf.MessageLite,
Type>
-
getDescriptor
Returns the descriptor of the extension. -
getExtensionType
-
getMessageType
If the extension is a message extension (i.e., getLiteType() == MESSAGE), returns the type of the message, otherwise undefined. -
fromReflectionType
-
singularFromReflectionType
-
toReflectionType
-
singularToReflectionType
-