GeneratedMessageLite.ExtendableBuilder
Date: 2017-07-08

com.google.protobuf

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

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

- All Implemented Interfaces:
    GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType,BuilderType>, MessageLite.Builder, MessageLiteOrBuilder, java.lang.Cloneable
  Enclosing class:
    GeneratedMessageLite<MessageType extends GeneratedMessageLite<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.Builder<MessageType,BuilderType>>

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

  Lite equivalent of `GeneratedMessage.ExtendableBuilder`.

- - ### Field Summary

    - ### Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

      `instance, isBuilt`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `GeneratedMessageLite.ExtendableBuilder(MessageType defaultInstance)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<Type> BuilderType` | `addExtension(ExtensionLite<MessageType,java.util.List<Type>> extension, Type value)` Append a value to a repeated extension.
    `MessageType` | `buildPartial()` Like `MessageLite.Builder.build()`, but does not throw an exception if the message is missing required fields.
    `<Type> BuilderType` | `clearExtension(ExtensionLite<MessageType,?> extension)` Clear an extension.
    `protected void` | `copyOnWrite()` Called before any method that would mutate the builder to ensure that it correctly copies any state before the write happens to preserve immutability guarantees.
    `<Type> Type` | `getExtension(ExtensionLite<MessageType,java.util.List<Type>> extension, int index)` Get one element of a repeated extension.
    `<Type> Type` | `getExtension(ExtensionLite<MessageType,Type> extension)` Get the value of an extension.
    `<Type> int` | `getExtensionCount(ExtensionLite<MessageType,java.util.List<Type>> extension)` Get the number of elements in a repeated extension.
    `<Type> boolean` | `hasExtension(ExtensionLite<MessageType,Type> extension)` Check if a singular extension is present.
    `<Type> BuilderType` | `setExtension(ExtensionLite<MessageType,java.util.List<Type>> extension, int index, Type value)` Set the value of one element of a repeated extension.
    `<Type> BuilderType` | `setExtension(ExtensionLite<MessageType,Type> extension, Type value)` Set the value of an extension.

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

      `build, clear, clone, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom`

    - ### 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.MessageLiteOrBuilder

      `getDefaultInstanceForType, isInitialized`

- - ### Constructor Detail

    - #### GeneratedMessageLite.ExtendableBuilder

          protected GeneratedMessageLite.ExtendableBuilder(MessageType defaultInstance)

  - ### Method Detail

    - #### copyOnWrite

          protected void copyOnWrite()

      Description copied from class: `GeneratedMessageLite.Builder`
      Called before any method that would mutate the builder to ensure that it correctly copies any state before the write happens to preserve immutability guarantees.
      Overrides:
        `copyOnWrite` in class `GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>`

    - #### buildPartial

          public final MessageType buildPartial()

      Description copied from interface: `MessageLite.Builder`
      Like `MessageLite.Builder.build()`, but does not throw an exception if the message is missing required fields. Instead, a partial message is returned. Subsequent changes to the Builder will not affect the returned message.
      Specified by:
        `buildPartial` in interface `MessageLite.Builder`
      Overrides:
        `buildPartial` in class `GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>`

    - #### hasExtension

          public final <Type> boolean hasExtension(ExtensionLite<MessageType,Type> extension)

      Check if a singular extension is present.
      Specified by:
        `hasExtension` in interface `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>`

    - #### getExtensionCount

          public final <Type> int getExtensionCount(ExtensionLite<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,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>`

    - #### getExtension

          public final <Type> Type getExtension(ExtensionLite<MessageType,Type> extension)

      Get the value of an extension.
      Specified by:
        `getExtension` in interface `GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>`

    - #### getExtension

          public final <Type> Type getExtension(ExtensionLite<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,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>`

    - #### setExtension

          public final <Type> BuilderType setExtension(ExtensionLite<MessageType,Type> extension,
                                        Type value)

      Set the value of an extension.

    - #### setExtension

          public final <Type> BuilderType setExtension(ExtensionLite<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(ExtensionLite<MessageType,java.util.List<Type>> extension,
                                        Type value)

      Append a value to a repeated extension.

    - #### clearExtension

          public final <Type> BuilderType clearExtension(ExtensionLite<MessageType,?> extension)

      Clear an extension.