Package com.google.protobuf

# Class GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,?>>

java.lang.Object
com.google.protobuf.AbstractParser<T>
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T>

All Implemented Interfaces:
  `Parser<T>`

Enclosing class:
  `GeneratedMessageLite<MessageType extends GeneratedMessageLite<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.Builder<MessageType,BuilderType>>`

protected static class GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,?>> extends AbstractParser<T>
A `Parser` implementation that delegates to the default instance.

For use by generated code only.

## Constructor Summary

Constructors
Constructor
Description
`DefaultInstanceBasedParser(T defaultInstance)`

## Method Summary

Modifier and Type
Method
Description
`T`
`parsePartialFrom(byte[] input, int offset, int length, ExtensionRegistryLite extensionRegistry)`
Like `Parser.parseFrom(ByteString, ExtensionRegistryLite)`, but does not throw an exception if the message is missing required fields.
`T`
`parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)`
Like `Parser.parseFrom(CodedInputStream input, ExtensionRegistryLite)`, but does not throw an exception if the message is missing required fields.

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

`parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialDelimitedFrom, parsePartialDelimitedFrom, parsePartialFrom, parsePartialFrom, parsePartialFrom, parsePartialFrom, parsePartialFrom, parsePartialFrom, parsePartialFrom, parsePartialFrom`

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

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

## Constructor Details

### DefaultInstanceBasedParser

public DefaultInstanceBasedParser(T defaultInstance)

## Method Details

### parsePartialFrom

public T parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
Description copied from interface: `Parser`
Like `Parser.parseFrom(CodedInputStream input, ExtensionRegistryLite)`, but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Throws:
  `InvalidProtocolBufferException`

### parsePartialFrom

public T parsePartialFrom(byte[] input, int offset, int length, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
Description copied from interface: `Parser`
Like `Parser.parseFrom(ByteString, ExtensionRegistryLite)`, but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Specified by:
  `parsePartialFrom` in interface `Parser<T extends GeneratedMessageLite<T,?>>`
Overrides:
  `parsePartialFrom` in class `AbstractParser<T extends GeneratedMessageLite<T,?>>`
Throws:
  `InvalidProtocolBufferException`