Interface GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends GeneratedMessage.ExtendableMessage<MessageT>>
- All Superinterfaces:
MessageLiteOrBuilder, MessageOrBuilder
- All Known Subinterfaces:
DescriptorProtos.EnumOptionsOrBuilder, DescriptorProtos.EnumValueOptionsOrBuilder, DescriptorProtos.ExtensionRangeOptionsOrBuilder, DescriptorProtos.FeatureSetOrBuilder, DescriptorProtos.FieldOptionsOrBuilder, DescriptorProtos.FileDescriptorSetOrBuilder, DescriptorProtos.FileOptionsOrBuilder, DescriptorProtos.MessageOptionsOrBuilder, DescriptorProtos.MethodOptionsOrBuilder, DescriptorProtos.OneofOptionsOrBuilder, DescriptorProtos.ServiceOptionsOrBuilder, DescriptorProtos.SourceCodeInfoOrBuilder, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT>
- All Known Implementing Classes:
DescriptorProtos.EnumOptions, DescriptorProtos.EnumOptions.Builder, DescriptorProtos.EnumValueOptions, DescriptorProtos.EnumValueOptions.Builder, DescriptorProtos.ExtensionRangeOptions, DescriptorProtos.ExtensionRangeOptions.Builder, DescriptorProtos.FeatureSet, DescriptorProtos.FeatureSet.Builder, DescriptorProtos.FieldOptions, DescriptorProtos.FieldOptions.Builder, DescriptorProtos.FileDescriptorSet, DescriptorProtos.FileDescriptorSet.Builder, DescriptorProtos.FileOptions, DescriptorProtos.FileOptions.Builder, DescriptorProtos.MessageOptions, DescriptorProtos.MessageOptions.Builder, DescriptorProtos.MethodOptions, DescriptorProtos.MethodOptions.Builder, DescriptorProtos.OneofOptions, DescriptorProtos.OneofOptions.Builder, DescriptorProtos.ServiceOptions, DescriptorProtos.ServiceOptions.Builder, DescriptorProtos.SourceCodeInfo, DescriptorProtos.SourceCodeInfo.Builder, GeneratedMessage.ExtendableBuilder, GeneratedMessage.ExtendableMessage, GeneratedMessageV3, GeneratedMessageV3.Builder, GeneratedMessageV3.ExtendableBuilder, GeneratedMessageV3.ExtendableMessage
- Enclosing class:
GeneratedMessage
public static interface GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends GeneratedMessage.ExtendableMessage<MessageT>>
extends MessageOrBuilder
Extends
MessageOrBuilder with extension-related functions.-
Method Summary
Modifier and TypeMethodDescriptionGet an instance of the type with no fields set.default <T> TgetExtension(Extension<? extends MessageT, List<T>> extension, int index) Overload to maintain ABI compatibility.default <T> TgetExtension(Extension<? extends MessageT, T> extension) Overload to maintain ABI compatibility.<T> TgetExtension(ExtensionLite<? extends MessageT, List<T>> extension, int index) Get one element of a repeated extension.<T> TgetExtension(ExtensionLite<? extends MessageT, T> extension) Get the value of an extension.default <T> TgetExtension(GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension, int index) Overload to maintain ABI compatibility.default <T> TgetExtension(GeneratedMessage.GeneratedExtension<MessageT, T> extension) Overload to maintain ABI compatibility.default <T> intgetExtensionCount(Extension<? extends MessageT, List<T>> extension) Overload to maintain ABI compatibility.<T> intgetExtensionCount(ExtensionLite<? extends MessageT, List<T>> extension) Get the number of elements in a repeated extension.default <T> intgetExtensionCount(GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension) Overload to maintain ABI compatibility.default <T> booleanhasExtension(Extension<? extends MessageT, T> extension) hasExtension() overload forExtensioninstances.<T> booleanhasExtension(ExtensionLite<? extends MessageT, T> extension) Check if a singular extension is present.default <T> booleanhasExtension(GeneratedMessage.GeneratedExtension<? extends MessageT, T> extension) Overload to maintain ABI compatibility.Methods inherited from interface MessageLiteOrBuilder
isInitializedMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDefaultInstanceForType
Message getDefaultInstanceForType()Description copied from interface:MessageLiteOrBuilderGet an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from thegetDefaultInstance()method of generated message classes in that this method is an abstract method of theMessageLiteinterface whereasgetDefaultInstance()is a static method of a specific class. They return the same thing.- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
hasExtension
Check if a singular extension is present. -
hasExtension
hasExtension() overload forExtensioninstances. SinceExtensionis a subtype ofExtensionLite, this is redundant for source-compatibility, but exists here to maintain ABI compatibility with .class files which dispatch to a method of the concrete type. -
hasExtension
default <T> boolean hasExtension(GeneratedMessage.GeneratedExtension<? extends MessageT, T> extension) Overload to maintain ABI compatibility. SeehasExtension(ExtensionLite). -
getExtensionCount
Get the number of elements in a repeated extension. -
getExtensionCount
Overload to maintain ABI compatibility. SeegetExtensionCount(ExtensionLite). -
getExtensionCount
Overload to maintain ABI compatibility. SeegetExtensionCount(ExtensionLite). -
getExtension
Get the value of an extension. -
getExtension
Overload to maintain ABI compatibility. SeegetExtension(ExtensionLite). -
getExtension
Overload to maintain ABI compatibility. SeegetExtension(ExtensionLite). -
getExtension
Get one element of a repeated extension. -
getExtension
Overload to maintain ABI compatibility. SeegetExtension(ExtensionLite). -
getExtension
default <T> T getExtension(GeneratedMessage.GeneratedExtension<MessageT, List<T>> extension, int index) Overload to maintain ABI compatibility. SeegetExtension(ExtensionLite).
-