Package com.google.protobuf

# 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 Type
Method
Description
`Message`
`getDefaultInstanceForType()`
Get an instance of the type with no fields set.
`<T> T`
`getExtension(ExtensionLite<? extends MessageT,List<T>> extension, int index)`
Get one element of a repeated extension.
`<T> T`
`getExtension(ExtensionLite<? extends MessageT,T> extension)`
Get the value of an extension.
`<T> int`
`getExtensionCount(ExtensionLite<? extends MessageT,List<T>> extension)`
Get the number of elements in a repeated extension.
`<T> boolean`
`hasExtension(ExtensionLite<? extends MessageT,T> extension)`
Check if a singular extension is present.

### Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

`isInitialized`

### Methods inherited from interface com.google.protobuf.MessageOrBuilder

`findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof`

## Method Details

### getDefaultInstanceForType

Message getDefaultInstanceForType()
Description copied from interface: `MessageLiteOrBuilder`
Get 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 the `getDefaultInstance()` method of generated message classes in that this method is an abstract method of the `MessageLite` interface whereas `getDefaultInstance()` is a static method of a specific class. They return the same thing.

Specified by:
  `getDefaultInstanceForType` in interface `MessageLiteOrBuilder`
Specified by:
  `getDefaultInstanceForType` in interface `MessageOrBuilder`

### hasExtension

<T> boolean hasExtension(ExtensionLite<? extends MessageT,T> extension)
Check if a singular extension is present.

### getExtensionCount

<T> int getExtensionCount(ExtensionLite<? extends MessageT,List<T>> extension)
Get the number of elements in a repeated extension.

### getExtension

<T> T getExtension(ExtensionLite<? extends MessageT,T> extension)
Get the value of an extension.

### getExtension

<T> T getExtension(ExtensionLite<? extends MessageT,List<T>> extension, int index)
Get one element of a repeated extension.