Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.google.protobuf.UnknownFieldSet Class Reference
Inheritance diagram for com.google.protobuf.UnknownFieldSet:
Inheritance graph
[legend]

Classes

class  Builder
 
class  Field
 
class  Parser
 

Public Member Functions

Map< Integer, FieldasMap ()
 
boolean equals (final Object other)
 
UnknownFieldSet getDefaultInstanceForType ()
 
Field getField (final int number)
 
final Parser getParserForType ()
 
int getSerializedSize ()
 
int getSerializedSizeAsMessageSet ()
 
boolean hasField (final int number)
 
int hashCode ()
 
boolean isInitialized ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
byte[] toByteArray ()
 
ByteString toByteString ()
 
String toString ()
 
void writeAsMessageSetTo (final CodedOutputStream output) throws IOException
 
void writeDelimitedTo (OutputStream output) throws IOException
 
void writeTo (final CodedOutputStream output) throws IOException
 
void writeTo (final OutputStream output) throws IOException
 

Static Public Member Functions

static UnknownFieldSet getDefaultInstance ()
 
static Builder newBuilder ()
 
static Builder newBuilder (final UnknownFieldSet copyFrom)
 
static UnknownFieldSet parseFrom (final byte[] data) throws InvalidProtocolBufferException
 
static UnknownFieldSet parseFrom (final ByteString data) throws InvalidProtocolBufferException
 
static UnknownFieldSet parseFrom (final CodedInputStream input) throws IOException
 
static UnknownFieldSet parseFrom (final InputStream input) throws IOException
 

Private Member Functions

 UnknownFieldSet ()
 

Private Attributes

final Map< Integer, Fieldfields
 
final Map< Integer, FieldfieldsDescending
 

Static Private Attributes

static final UnknownFieldSet defaultInstance
 
static final Parser PARSER = new Parser()
 

Detailed Description

is used to keep track of fields which were seen when parsing a protocol message but whose field numbers or types are unrecognized. This most frequently occurs when new fields are added to a message type and then messages containing those fields are read by old software that was compiled before the new types were added.

Every Message contains an

(and every Message.Builder contains an Builder).

Most users will never need to use this class.

Author
kento.nosp@m.n@go.nosp@m.ogle..nosp@m.com Kenton Varda

Definition at line 58 of file UnknownFieldSet.java.

Constructor & Destructor Documentation

◆ UnknownFieldSet()

com.google.protobuf.UnknownFieldSet.UnknownFieldSet ( )
inlineprivate

Definition at line 60 of file UnknownFieldSet.java.

Member Function Documentation

◆ asMap()

Map<Integer, Field> com.google.protobuf.UnknownFieldSet.asMap ( )
inline

Get a map of fields in the set by number.

Definition at line 117 of file UnknownFieldSet.java.

◆ equals()

boolean com.google.protobuf.UnknownFieldSet.equals ( final Object  other)
inline

Definition at line 104 of file UnknownFieldSet.java.

◆ getDefaultInstance()

static UnknownFieldSet com.google.protobuf.UnknownFieldSet.getDefaultInstance ( )
inlinestatic

Get an empty

.

Definition at line 76 of file UnknownFieldSet.java.

◆ getDefaultInstanceForType()

UnknownFieldSet com.google.protobuf.UnknownFieldSet.getDefaultInstanceForType ( )
inline

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

method of generated message classes in that this method is an abstract method of the

MessageLite

interface whereas

is a static method of a specific class. They return the same thing.

Implements com.google.protobuf.MessageLiteOrBuilder.

Definition at line 81 of file UnknownFieldSet.java.

◆ getField()

Field com.google.protobuf.UnknownFieldSet.getField ( final int  number)
inline

Get a field by number. Returns an empty field if not present. Never returns

null

.

Definition at line 127 of file UnknownFieldSet.java.

◆ getParserForType()

final Parser com.google.protobuf.UnknownFieldSet.getParserForType ( )
inline

Gets the parser for a message of the same type as this message.

Implements com.google.protobuf.MessageLite.

Definition at line 1075 of file UnknownFieldSet.java.

◆ getSerializedSize()

int com.google.protobuf.UnknownFieldSet.getSerializedSize ( )
inline

Get the number of bytes required to encode this set.

Implements com.google.protobuf.MessageLite.

Definition at line 205 of file UnknownFieldSet.java.

◆ getSerializedSizeAsMessageSet()

int com.google.protobuf.UnknownFieldSet.getSerializedSizeAsMessageSet ( )
inline

Get the number of bytes required to encode this set using

MessageSet

wire format.

Definition at line 251 of file UnknownFieldSet.java.

◆ hasField()

boolean com.google.protobuf.UnknownFieldSet.hasField ( final int  number)
inline

Check if the given field number is present in the set.

Definition at line 122 of file UnknownFieldSet.java.

◆ hashCode()

int com.google.protobuf.UnknownFieldSet.hashCode ( )
inline

Definition at line 112 of file UnknownFieldSet.java.

◆ isInitialized()

boolean com.google.protobuf.UnknownFieldSet.isInitialized ( )
inline

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Implements com.google.protobuf.MessageLiteOrBuilder.

Definition at line 260 of file UnknownFieldSet.java.

◆ newBuilder() [1/2]

static Builder com.google.protobuf.UnknownFieldSet.newBuilder ( )
inlinestatic

Create a new Builder.

Definition at line 66 of file UnknownFieldSet.java.

◆ newBuilder() [2/2]

static Builder com.google.protobuf.UnknownFieldSet.newBuilder ( final UnknownFieldSet  copyFrom)
inlinestatic

Create a new Builder and initialize it to be a copy of

copyFrom

.

Definition at line 71 of file UnknownFieldSet.java.

◆ newBuilderForType()

Builder com.google.protobuf.UnknownFieldSet.newBuilderForType ( )
inline

Constructs a new builder for a message of the same type as this message.

Implements com.google.protobuf.MessageLite.

Definition at line 288 of file UnknownFieldSet.java.

◆ parseFrom() [1/4]

static UnknownFieldSet com.google.protobuf.UnknownFieldSet.parseFrom ( final byte[]  data) throws InvalidProtocolBufferException
inlinestatic

Parse

as an

and return it.

Definition at line 278 of file UnknownFieldSet.java.

◆ parseFrom() [2/4]

static UnknownFieldSet com.google.protobuf.UnknownFieldSet.parseFrom ( final ByteString  data) throws InvalidProtocolBufferException
inlinestatic

Parse

as an

and return it.

Definition at line 272 of file UnknownFieldSet.java.

◆ parseFrom() [3/4]

static UnknownFieldSet com.google.protobuf.UnknownFieldSet.parseFrom ( final CodedInputStream  input) throws IOException
inlinestatic

Parse an

from the given input stream.

Definition at line 267 of file UnknownFieldSet.java.

◆ parseFrom() [4/4]

static UnknownFieldSet com.google.protobuf.UnknownFieldSet.parseFrom ( final InputStream  input) throws IOException
inlinestatic

Parse an

from

and return it.

Definition at line 283 of file UnknownFieldSet.java.

◆ toBuilder()

Builder com.google.protobuf.UnknownFieldSet.toBuilder ( )
inline

Constructs a builder initialized with the current message. Use this to derive a new message from the current one.

Implements com.google.protobuf.MessageLite.

Definition at line 293 of file UnknownFieldSet.java.

◆ toByteArray()

byte [] com.google.protobuf.UnknownFieldSet.toByteArray ( )
inline

Serializes the message to a

byte

array and returns it. This is just a trivial wrapper around writeTo(CodedOutputStream).

Implements com.google.protobuf.MessageLite.

Definition at line 171 of file UnknownFieldSet.java.

◆ toByteString()

ByteString com.google.protobuf.UnknownFieldSet.toByteString ( )
inline

Serializes the message to a

ByteString

and returns it. This is just a trivial wrapper around writeTo(CodedOutputStream).

Implements com.google.protobuf.MessageLite.

Definition at line 155 of file UnknownFieldSet.java.

◆ toString()

String com.google.protobuf.UnknownFieldSet.toString ( )
inline

Converts the set to a string in protocol buffer text format. This is just a trivial wrapper around TextFormat.Printer#printToString(UnknownFieldSet).

Definition at line 146 of file UnknownFieldSet.java.

◆ writeAsMessageSetTo()

void com.google.protobuf.UnknownFieldSet.writeAsMessageSetTo ( final CodedOutputStream  output) throws IOException
inline

Serializes the set and writes it to

using

MessageSet

wire format.

Definition at line 214 of file UnknownFieldSet.java.

◆ writeDelimitedTo()

void com.google.protobuf.UnknownFieldSet.writeDelimitedTo ( OutputStream  output) throws IOException
inline

Like writeTo(OutputStream), but writes the size of the message as a varint before writing the data. This allows more data to be written to the stream after the message without the need to delimit the message data yourself. Use {} (or the static method YourMessageType.parseDelimitedFrom(InputStream) ) to parse messages written by this method.

Implements com.google.protobuf.MessageLite.

Definition at line 196 of file UnknownFieldSet.java.

◆ writeTo() [1/2]

void com.google.protobuf.UnknownFieldSet.writeTo ( final CodedOutputStream  output) throws IOException
inline

Serializes the set and writes it to

.

Implements com.google.protobuf.MessageLite.

Definition at line 134 of file UnknownFieldSet.java.

◆ writeTo() [2/2]

void com.google.protobuf.UnknownFieldSet.writeTo ( final OutputStream  output) throws IOException
inline

Serializes the message and writes it to

. This is just a trivial wrapper around writeTo(CodedOutputStream).

Implements com.google.protobuf.MessageLite.

Definition at line 189 of file UnknownFieldSet.java.

Member Data Documentation

◆ defaultInstance

final UnknownFieldSet com.google.protobuf.UnknownFieldSet.defaultInstance
staticprivate
Initial value:
=
Collections.<Integer, Field>emptyMap(), Collections.<Integer, Field>emptyMap())

Definition at line 85 of file UnknownFieldSet.java.

◆ fields

final Map<Integer, Field> com.google.protobuf.UnknownFieldSet.fields
private

Definition at line 97 of file UnknownFieldSet.java.

◆ fieldsDescending

final Map<Integer, Field> com.google.protobuf.UnknownFieldSet.fieldsDescending
private

A copy of fields who's iterator order is reversed.

Definition at line 100 of file UnknownFieldSet.java.

◆ PARSER

final Parser com.google.protobuf.UnknownFieldSet.PARSER = new Parser()
staticprivate

Definition at line 1072 of file UnknownFieldSet.java.


The documentation for this class was generated from the following file:
com.google.protobuf.UnknownFieldSet.getDefaultInstance
static UnknownFieldSet getDefaultInstance()
Definition: UnknownFieldSet.java:76
input
std::string input
Definition: tokenizer_unittest.cc:197
com.google.protobuf.UnknownFieldSet.UnknownFieldSet
UnknownFieldSet()
Definition: UnknownFieldSet.java:60
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: glcorearb.h:2879
Field
Definition: type.pb.h:416
output
const upb_json_parsermethod const upb_symtab upb_sink * output
Definition: ruby/ext/google/protobuf_c/upb.h:10503


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