Package com.google.protobuf

## Class GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>

- java.lang.Object
- - com.google.protobuf.AbstractMessageLite
  - - com.google.protobuf.GeneratedMessageLite
    - - com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType>

All Implemented Interfaces:
  `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType>`, `MessageLite`, `MessageLiteOrBuilder`, `java.io.Serializable`

Enclosing class:
  GeneratedMessageLite

    public abstract static class GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>
    extends GeneratedMessageLite
    implements GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType>

Lite equivalent of `GeneratedMessage.ExtendableMessage`.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`protected class` `GeneratedMessageLite.ExtendableMessage.ExtensionWriter` Used by subclasses to serialize extensions.

### Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

`GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite,​BuilderType extends GeneratedMessageLite.Builder>, GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,​BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>, GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage>, GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,​Type>`

### Field Summary

### Fields inherited from class com.google.protobuf.AbstractMessageLite

`memoizedHashCode`

### Constructor Summary

Constructors
`protected` `ExtendableMessage()`
`protected` `ExtendableMessage​(GeneratedMessageLite.ExtendableBuilder<MessageType,​?> builder)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected boolean` `extensionsAreInitialized()` Called by subclasses to check if all extensions are initialized.
`protected int` `extensionsSerializedSize()` Called by subclasses to compute the size of extensions.
`protected int` `extensionsSerializedSizeAsMessageSet()`
`<Type> Type` `getExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension, int index)` Get one element of a repeated extension.
`<Type> Type` `getExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​Type> extension)` Get the value of an extension.
`<Type> int` `getExtensionCount​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension)` Get the number of elements in a repeated extension.
`<Type> boolean` `hasExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​Type> extension)` Check if a singular extension is present.
`protected void` `makeExtensionsImmutable()` Used by parsing constructors in generated classes.
`protected GeneratedMessageLite.ExtendableMessage.ExtensionWriter` `newExtensionWriter()`
`protected GeneratedMessageLite.ExtendableMessage.ExtensionWriter` `newMessageSetExtensionWriter()`
`protected boolean` `parseUnknownField​(CodedInputStream input, CodedOutputStream unknownFieldsCodedOutput, ExtensionRegistryLite extensionRegistry, int tag)` Called by subclasses to parse an unknown field or an extension.

### Methods inherited from class com.google.protobuf.GeneratedMessageLite

`getParserForType, newRepeatedGeneratedExtension, newSingularGeneratedExtension, writeReplace`

### Methods inherited from class com.google.protobuf.AbstractMessageLite

`checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

`getSerializedSize, newBuilderForType, toBuilder, writeTo`

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

`getDefaultInstanceForType, isInitialized`

### Constructor Detail

#### ExtendableMessage

    protected ExtendableMessage()

#### ExtendableMessage

    protected ExtendableMessage​(GeneratedMessageLite.ExtendableBuilder<MessageType,​?> builder)

### Method Detail

#### hasExtension

    public final <Type> boolean hasExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​Type> extension)

Check if a singular extension is present.

Specified by:
  `hasExtension` in interface `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>`

#### getExtensionCount

    public final <Type> int getExtensionCount​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension)

Get the number of elements in a repeated extension.

Specified by:
  `getExtensionCount` in interface `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>`

#### getExtension

    public final <Type> Type getExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​Type> extension)

Get the value of an extension.

Specified by:
  `getExtension` in interface `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>`

#### getExtension

    public final <Type> Type getExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension,
                                          int index)

Get one element of a repeated extension.

Specified by:
  `getExtension` in interface `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>>`

#### extensionsAreInitialized

    protected boolean extensionsAreInitialized()

Called by subclasses to check if all extensions are initialized.

#### parseUnknownField

    protected boolean parseUnknownField​(CodedInputStream input,
                                        CodedOutputStream unknownFieldsCodedOutput,
                                        ExtensionRegistryLite extensionRegistry,
                                        int tag)
                                 throws java.io.IOException

Called by subclasses to parse an unknown field or an extension.

Overrides:
  `parseUnknownField` in class `GeneratedMessageLite`
Returns:
  `true` unless the tag is an end-group tag.
Throws:
  `java.io.IOException`

#### makeExtensionsImmutable

    protected void makeExtensionsImmutable()

Used by parsing constructors in generated classes.

Overrides:
  `makeExtensionsImmutable` in class `GeneratedMessageLite`

#### newExtensionWriter

    protected GeneratedMessageLite.ExtendableMessage.ExtensionWriter newExtensionWriter()

#### newMessageSetExtensionWriter

    protected GeneratedMessageLite.ExtendableMessage.ExtensionWriter newMessageSetExtensionWriter()

#### extensionsSerializedSize

    protected int extensionsSerializedSize()

Called by subclasses to compute the size of extensions.

#### extensionsSerializedSizeAsMessageSet

    protected int extensionsSerializedSizeAsMessageSet()