Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
com.google.protobuf.AbstractParser< MessageType extends MessageLite > Class Template Referenceabstract
Inheritance diagram for com.google.protobuf.AbstractParser< MessageType extends MessageLite >:
Inheritance graph
[legend]

Public Member Functions

MessageType parseDelimitedFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parseDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data, int off, int len) throws InvalidProtocolBufferException
 
MessageType parseFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteBuffer data) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteString data) throws InvalidProtocolBufferException
 
MessageType parseFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (CodedInputStream input) throws InvalidProtocolBufferException
 
MessageType parseFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parseFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parseFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialDelimitedFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parsePartialDelimitedFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data, int off, int len) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (ByteString data) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (CodedInputStream input) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (InputStream input) throws InvalidProtocolBufferException
 
MessageType parsePartialFrom (InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 
- Public Member Functions inherited from com.google.protobuf.Parser< MessageType >
MessageType parsePartialFrom (CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
 

Private Member Functions

MessageType checkMessageInitialized (MessageType message) throws InvalidProtocolBufferException
 
UninitializedMessageException newUninitializedMessageException (MessageType message)
 

Static Private Attributes

static final ExtensionRegistryLite EMPTY_REGISTRY
 

Detailed Description

A partial implementation of the Parser interface which implements as many methods of that interface as possible in terms of other methods.

Note: This class implements all the convenience methods in the Parser interface. See Parser for related javadocs. Subclasses need to implement {} liuji.nosp@m.si@g.nosp@m.oogle.nosp@m..com (Pherl Liu)

Definition at line 48 of file AbstractParser.java.

Member Function Documentation

◆ checkMessageInitialized()

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.checkMessageInitialized ( MessageType  message) throws InvalidProtocolBufferException
inlineprivate

Helper method to check if message is initialized.

Exceptions
InvalidProtocolBufferExceptionif it is not initialized.
Returns
The message to check.

Definition at line 64 of file AbstractParser.java.

◆ newUninitializedMessageException()

UninitializedMessageException com.google.protobuf.AbstractParser< MessageType extends MessageLite >.newUninitializedMessageException ( MessageType  message)
inlineprivate

Creates an UninitializedMessageException for MessageType.

Definition at line 51 of file AbstractParser.java.

◆ parseDelimitedFrom() [1/2]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseDelimitedFrom ( InputStream  input) throws InvalidProtocolBufferException
inline

◆ parseDelimitedFrom() [2/2]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseDelimitedFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseDelimitedFrom(InputStream) but supporting extensions.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 265 of file AbstractParser.java.

◆ parseFrom() [1/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( byte[]  data) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 207 of file AbstractParser.java.

◆ parseFrom() [2/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( byte[]  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 201 of file AbstractParser.java.

◆ parseFrom() [3/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( byte[]  data,
int  off,
int  len 
) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 195 of file AbstractParser.java.

◆ parseFrom() [4/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( byte[]  data,
int  off,
int  len,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 188 of file AbstractParser.java.

◆ parseFrom() [5/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( ByteBuffer  data) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 148 of file AbstractParser.java.

◆ parseFrom() [6/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( ByteBuffer  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 129 of file AbstractParser.java.

◆ parseFrom() [7/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( ByteString  data) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 124 of file AbstractParser.java.

◆ parseFrom() [8/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( ByteString  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Parses

as a message of

MessageType

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 118 of file AbstractParser.java.

◆ parseFrom() [9/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( CodedInputStream  input) throws InvalidProtocolBufferException
inline

Parses a message of

MessageType

from the input.

Note: The caller should call CodedInputStream#checkLastTagWas(int) after calling this to verify that the last tag seen was the appropriate end-group tag, or zero for EOF.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 90 of file AbstractParser.java.

◆ parseFrom() [10/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( CodedInputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in

extensionRegistry

. Extensions not in the registry will be treated as unknown fields.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 84 of file AbstractParser.java.

◆ parseFrom() [11/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( InputStream  input) throws InvalidProtocolBufferException
inline

Parse a message of

MessageType

from

. This is just a small wrapper around parseFrom(CodedInputStream). Note that this method always reads the entire input (unless it throws an exception). If you want it to stop earlier, you will need to wrap your input in some wrapper stream that limits reading. Or, use {} to write your message and { #parseDelimitedFrom(InputStream)} to read it. Despite usually reading the entire input, this does not close the stream.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 236 of file AbstractParser.java.

◆ parseFrom() [12/12]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parseFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Parses a message of

MessageType

from

. This is just a small wrapper around parseFrom(CodedInputStream, ExtensionRegistryLite).

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 230 of file AbstractParser.java.

◆ parsePartialDelimitedFrom() [1/2]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialDelimitedFrom ( InputStream  input) throws InvalidProtocolBufferException
inline

Like parseDelimitedFrom(InputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 259 of file AbstractParser.java.

◆ parsePartialDelimitedFrom() [2/2]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialDelimitedFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseDelimitedFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 241 of file AbstractParser.java.

◆ parsePartialFrom() [1/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( byte[]  data) throws InvalidProtocolBufferException
inline

Like parseFrom(byte[]), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 183 of file AbstractParser.java.

◆ parsePartialFrom() [2/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( byte[]  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseFrom(byte[], ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 177 of file AbstractParser.java.

◆ parsePartialFrom() [3/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( byte[]  data,
int  off,
int  len 
) throws InvalidProtocolBufferException
inline

Like parseFrom(byte[], int, int), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 171 of file AbstractParser.java.

◆ parsePartialFrom() [4/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( byte[]  data,
int  off,
int  len,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 153 of file AbstractParser.java.

◆ parsePartialFrom() [5/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( ByteString  data) throws InvalidProtocolBufferException
inline

Like parseFrom(ByteString), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 113 of file AbstractParser.java.

◆ parsePartialFrom() [6/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( ByteString  data,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseFrom(ByteString, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 95 of file AbstractParser.java.

◆ parsePartialFrom() [7/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( CodedInputStream  input) throws InvalidProtocolBufferException
inline

Like parseFrom(CodedInputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 78 of file AbstractParser.java.

◆ parsePartialFrom() [8/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( InputStream  input) throws InvalidProtocolBufferException
inline

Like parseFrom(InputStream), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 225 of file AbstractParser.java.

◆ parsePartialFrom() [9/9]

MessageType com.google.protobuf.AbstractParser< MessageType extends MessageLite >.parsePartialFrom ( InputStream  input,
ExtensionRegistryLite  extensionRegistry 
) throws InvalidProtocolBufferException
inline

Like parseFrom(InputStream, ExtensionRegistryLite), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned.

Implements com.google.protobuf.Parser< MessageType >.

Definition at line 212 of file AbstractParser.java.

Member Data Documentation

◆ EMPTY_REGISTRY

final ExtensionRegistryLite com.google.protobuf.AbstractParser< MessageType extends MessageLite >.EMPTY_REGISTRY
staticprivate
Initial value:
=
ExtensionRegistryLite.getEmptyRegistry()

Definition at line 74 of file AbstractParser.java.


The documentation for this class was generated from the following file:
input
std::string input
Definition: tokenizer_unittest.cc:197
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: glcorearb.h:2879


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:06