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>
AParser
implementation that delegates to the default instance.For use by generated code only.
-
-
Constructor Summary
Constructors Constructor Description DefaultInstanceBasedParser(T defaultInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
parsePartialFrom(byte[] input, int offset, int length, ExtensionRegistryLite extensionRegistry)
LikeParser.parseFrom(ByteString, ExtensionRegistryLite)
, but does not throw an exception if the message is missing required fields.T
parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
LikeParser.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
-
-
-
-
Constructor Detail
-
DefaultInstanceBasedParser
public DefaultInstanceBasedParser(T defaultInstance)
-
-
Method Detail
-
parsePartialFrom
public T parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
Description copied from interface:Parser
LikeParser.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
LikeParser.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 interfaceParser<T extends GeneratedMessageLite<T,?>>
- Overrides:
parsePartialFrom
in classAbstractParser<T extends GeneratedMessageLite<T,?>>
- Throws:
InvalidProtocolBufferException
-
-