Package com.google.protobuf

## Class GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,​BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>

- java.lang.Object
- - com.google.protobuf.AbstractMessageLite.Builder<BuilderType>
  - - com.google.protobuf.GeneratedMessageLite.Builder<MessageType,​BuilderType>
    - - com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>

All Implemented Interfaces:
  `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType>`, `MessageLite.Builder`, `MessageLiteOrBuilder`, `java.lang.Cloneable`

Enclosing class:
  GeneratedMessageLite

    public abstract static class GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,​BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>
    extends GeneratedMessageLite.Builder<MessageType,​BuilderType>
    implements GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType>

Lite equivalent of `GeneratedMessage.ExtendableBuilder`.

### Constructor Summary

Constructors
`protected` `ExtendableBuilder()`

### Method Summary

All Methods Instance Methods Concrete Methods
`<Type> BuilderType` `addExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension, Type value)` Append a value to a repeated extension.
`BuilderType` `clear()` Resets all fields to their default values.
`<Type> BuilderType` `clearExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​?> extension)` Clear an extension.
`BuilderType` `clone()` Clones the Builder.
`protected boolean` `extensionsAreInitialized()` Called by subclasses to check if all extensions are initialized.
`<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` `mergeExtensionFields​(MessageType other)`
`protected boolean` `parseUnknownField​(CodedInputStream input, CodedOutputStream unknownFieldsCodedOutput, ExtensionRegistryLite extensionRegistry, int tag)` Called by subclasses to parse an unknown field or an extension.
`<Type> BuilderType` `setExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension, int index, Type value)` Set the value of one element of a repeated extension.
`<Type> BuilderType` `setExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​Type> extension, Type value)` Set the value of an extension.

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

`getDefaultInstanceForType, getUnknownFields, mergeFrom, setUnknownFields`

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

`addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException`

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

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

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

`build, buildPartial`

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

`getDefaultInstanceForType, isInitialized`

### Constructor Detail

#### ExtendableBuilder

    protected ExtendableBuilder()

### Method Detail

#### clear

    public BuilderType clear()

Description copied from interface: `MessageLite.Builder`
Resets all fields to their default values.

Specified by:
  `clear` in interface `MessageLite.Builder`
Overrides:
  `clear` in class `GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,​BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>`

#### 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>>`

#### clone

    public BuilderType clone()

Description copied from interface: `MessageLite.Builder`
Clones the Builder.

Specified by:
  `clone` in interface `MessageLite.Builder`
Overrides:
  `clone` in class `GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,​BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>`
See Also:
  `Object.clone()`

#### setExtension

    public final <Type> BuilderType setExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​Type> extension,
                                                 Type value)

Set the value of an extension.

#### setExtension

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

Set the value of one element of a repeated extension.

#### addExtension

    public final <Type> BuilderType addExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​java.util.List<Type>> extension,
                                                 Type value)

Append a value to a repeated extension.

#### clearExtension

    public final <Type> BuilderType clearExtension​(GeneratedMessageLite.GeneratedExtension<MessageType,​?> extension)

Clear an extension.

#### 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.Builder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType>,​BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,​BuilderType>>`
Returns:
  `true` unless the tag is an end-group tag.
Throws:
  `java.io.IOException`

#### mergeExtensionFields

    protected final void mergeExtensionFields​(MessageType other)