Package com.google.protobuf
Class GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,Type>
- java.lang.Object
-
- com.google.protobuf.ExtensionLite<ContainingType,Type>
-
- com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType,Type>
-
- Enclosing class:
- GeneratedMessageLite<MessageType extends GeneratedMessageLite<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.Builder<MessageType,BuilderType>>
public static class GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,Type> extends ExtensionLite<ContainingType,Type>
Lite equivalent toGeneratedMessage.GeneratedExtension.Users should ignore the contents of this class and only use objects of this type as parameters to extension accessors and ExtensionRegistry.add().
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainingTypegetContainingTypeDefaultInstance()Default instance of the type being extended, used to identify that type.java.lang.ObjectgetContainingTypeDefaultInstanceObject()Default instance of the type being extended, as Object (for MicroEJ compatibility).TypegetDefaultValue()Returns the default value of the extension field.WireFormat.FieldTypegetLiteType()Returns the type of the field.MessageLitegetMessageDefaultInstance()If the extension is an embedded message or group, returns the default instance of the message.java.lang.ObjectgetMessageDefaultInstanceObject()Returns the message default instance as Object (for MicroEJ compatibility).intgetNumber()Get the field number.booleanisRepeated()Returns whether it is a repeated field.
-
-
-
Method Detail
-
getContainingTypeDefaultInstance
public ContainingType getContainingTypeDefaultInstance()
Default instance of the type being extended, used to identify that type.
-
getContainingTypeDefaultInstanceObject
public java.lang.Object getContainingTypeDefaultInstanceObject()
Default instance of the type being extended, as Object (for MicroEJ compatibility).
-
getNumber
public int getNumber()
Get the field number.- Specified by:
getNumberin classExtensionLite<ContainingType extends MessageLite,Type>
-
getMessageDefaultInstance
public MessageLite getMessageDefaultInstance()
If the extension is an embedded message or group, returns the default instance of the message.- Specified by:
getMessageDefaultInstancein classExtensionLite<ContainingType extends MessageLite,Type>
-
getMessageDefaultInstanceObject
public java.lang.Object getMessageDefaultInstanceObject()
Returns the message default instance as Object (for MicroEJ compatibility). For standard extensions this returns the same asgetMessageDefaultInstance(). For MicroEJ extensions this returns the MicroEJMessageLite default instance.
-
getLiteType
public WireFormat.FieldType getLiteType()
Description copied from class:ExtensionLiteReturns the type of the field.- Specified by:
getLiteTypein classExtensionLite<ContainingType extends MessageLite,Type>
-
isRepeated
public boolean isRepeated()
Description copied from class:ExtensionLiteReturns whether it is a repeated field.- Specified by:
isRepeatedin classExtensionLite<ContainingType extends MessageLite,Type>
-
getDefaultValue
public Type getDefaultValue()
Description copied from class:ExtensionLiteReturns the default value of the extension field.- Specified by:
getDefaultValuein classExtensionLite<ContainingType extends MessageLite,Type>
-
-