Package com.google.protobuf

## Class GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite,​BuilderType extends GeneratedMessageLite.Builder>

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

All Implemented Interfaces:
  `MessageLite.Builder`, `MessageLiteOrBuilder`, `java.lang.Cloneable`

Direct Known Subclasses:
  `GeneratedMessageLite.ExtendableBuilder`

Enclosing class:
  GeneratedMessageLite

    public abstract static class GeneratedMessageLite.Builder<MessageType extends GeneratedMessageLite,​BuilderType extends GeneratedMessageLite.Builder>
    extends AbstractMessageLite.Builder<BuilderType>

### Constructor Summary

Constructors
`protected` `Builder()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`BuilderType` `clear()` Resets all fields to their default values.
`BuilderType` `clone()` Clones the Builder.
`abstract MessageType` `getDefaultInstanceForType()` Get an instance of the type with no fields set.
`ByteString` `getUnknownFields()`
`abstract BuilderType` `mergeFrom​(MessageType message)` All subclasses implement this.
`protected boolean` `parseUnknownField​(CodedInputStream input, CodedOutputStream unknownFieldsCodedOutput, ExtensionRegistryLite extensionRegistry, int tag)` Called by subclasses to parse an unknown field.
`BuilderType` `setUnknownFields​(ByteString unknownFields)`

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

`isInitialized`

### Constructor Detail

#### Builder

    protected Builder()

### Method Detail

#### clear

    public BuilderType clear()

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

#### clone

    public BuilderType clone()

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

Specified by:
  `clone` in interface `MessageLite.Builder`
Specified by:
  `clone` in class `AbstractMessageLite.Builder<BuilderType extends GeneratedMessageLite.Builder>`
See Also:
  `Object.clone()`

#### mergeFrom

    public abstract BuilderType mergeFrom​(MessageType message)

All subclasses implement this.

#### getDefaultInstanceForType

    public abstract MessageType 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.

#### parseUnknownField

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

Called by subclasses to parse an unknown field.

Returns:
  `true` unless the tag is an end-group tag.
Throws:
  `java.io.IOException`

#### getUnknownFields

    public final ByteString getUnknownFields()

#### setUnknownFields

    public final BuilderType setUnknownFields​(ByteString unknownFields)