webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | Static Public Member Functions | List of all members
com.google.protobuf.DynamicMessage Class Reference
Inheritance diagram for com.google.protobuf.DynamicMessage:
com.google.protobuf.AbstractMessage com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType > com.google.protobuf.Message com.google.protobuf.MessageLite com.google.protobuf.MessageLite com.google.protobuf.MessageOrBuilder com.google.protobuf.MessageLiteOrBuilder com.google.protobuf.MessageLiteOrBuilder com.google.protobuf.MessageLiteOrBuilder

Classes

class  Builder
 

Public Member Functions

Descriptor getDescriptorForType ()
 
DynamicMessage getDefaultInstanceForType ()
 
Map< FieldDescriptor, ObjectgetAllFields ()
 
boolean hasOneof (OneofDescriptor oneof)
 
FieldDescriptor getOneofFieldDescriptor (OneofDescriptor oneof)
 
boolean hasField (FieldDescriptor field)
 
Object getField (FieldDescriptor field)
 
int getRepeatedFieldCount (FieldDescriptor field)
 
Object getRepeatedField (FieldDescriptor field, int index)
 
UnknownFieldSet getUnknownFields ()
 
boolean isInitialized ()
 
void writeTo (CodedOutputStream output) throws IOException
 
int getSerializedSize ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
Parser< DynamicMessagegetParserForType ()
 
- Public Member Functions inherited from com.google.protobuf.AbstractMessage
boolean isInitialized ()
 
List< String > findInitializationErrors ()
 
String getInitializationErrorString ()
 
boolean hasOneof (OneofDescriptor oneof)
 
FieldDescriptor getOneofFieldDescriptor (OneofDescriptor oneof)
 
final String toString ()
 
void writeTo (final CodedOutputStream output) throws IOException
 
int getSerializedSize ()
 
boolean equals (final Object other)
 
int hashCode ()
 
- Public Member Functions inherited from com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >
ByteString toByteString ()
 
byte [] toByteArray ()
 
void writeTo (final OutputStream output) throws IOException
 
void writeDelimitedTo (final OutputStream output) throws IOException
 
- Public Member Functions inherited from com.google.protobuf.MessageOrBuilder
boolean hasOneof (Descriptors.OneofDescriptor oneof)
 
Descriptors.FieldDescriptor getOneofFieldDescriptor (Descriptors.OneofDescriptor oneof)
 
boolean hasField (Descriptors.FieldDescriptor field)
 
Object getField (Descriptors.FieldDescriptor field)
 
int getRepeatedFieldCount (Descriptors.FieldDescriptor field)
 
Object getRepeatedField (Descriptors.FieldDescriptor field, int index)
 

Static Public Member Functions

static DynamicMessage getDefaultInstance (Descriptor type)
 
static DynamicMessage parseFrom (Descriptor type, CodedInputStream input) throws IOException
 
static DynamicMessage parseFrom (Descriptor type, CodedInputStream input, ExtensionRegistry extensionRegistry) throws IOException
 
static DynamicMessage parseFrom (Descriptor type, ByteString data) throws InvalidProtocolBufferException
 
static DynamicMessage parseFrom (Descriptor type, ByteString data, ExtensionRegistry extensionRegistry) throws InvalidProtocolBufferException
 
static DynamicMessage parseFrom (Descriptor type, byte[] data) throws InvalidProtocolBufferException
 
static DynamicMessage parseFrom (Descriptor type, byte[] data, ExtensionRegistry extensionRegistry) throws InvalidProtocolBufferException
 
static DynamicMessage parseFrom (Descriptor type, InputStream input) throws IOException
 
static DynamicMessage parseFrom (Descriptor type, InputStream input, ExtensionRegistry extensionRegistry) throws IOException
 
static Builder newBuilder (Descriptor type)
 
static Builder newBuilder (Message prototype)
 

Additional Inherited Members

- Static Protected Member Functions inherited from com.google.protobuf.AbstractMessage
static int hashFields (int hash, Map< FieldDescriptor, Object > map)
 
- Static Protected Member Functions inherited from com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >
static void checkByteStringIsUtf8 (ByteString byteString) throws IllegalArgumentException
 
static< T > void addAll (final Iterable< T > values, final Collection<? super T > list)
 
- Protected Attributes inherited from com.google.protobuf.AbstractMessage
int memoizedSize = -1
 
- Protected Attributes inherited from com.google.protobuf.AbstractMessageLite< MessageType extends AbstractMessageLite< MessageType, BuilderType, BuilderType extends AbstractMessageLite.Builder< MessageType, BuilderType >
int memoizedHashCode = 0
 

Detailed Description

An implementation of Message that can represent arbitrary types, given a Descriptors.Descriptor.

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

Member Function Documentation

◆ getAllFields()

Map<FieldDescriptor, Object> com.google.protobuf.DynamicMessage.getAllFields ( )
inline

Returns a collection of all the fields in this message which are set and their corresponding values. A singular ("required" or "optional") field is set iff hasField() returns true for that field. A "repeated" field is set iff getRepeatedFieldCount() is greater than zero. The values are exactly what would be returned by calling getField(Descriptors.FieldDescriptor) for each field. The map is guaranteed to be a sorted map, so iterating over it will return fields in order by field number.
If this is for a builder, the returned map may or may not reflect future changes to the builder. Either way, the returned map is itself unmodifiable.

Implements com.google.protobuf.MessageOrBuilder.

◆ getDefaultInstance()

static DynamicMessage com.google.protobuf.DynamicMessage.getDefaultInstance ( Descriptor  type)
inlinestatic

Get a

DynamicMessage

representing the default instance of the given type.

◆ getDefaultInstanceForType()

DynamicMessage com.google.protobuf.DynamicMessage.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.MessageOrBuilder.

◆ getDescriptorForType()

Descriptor com.google.protobuf.DynamicMessage.getDescriptorForType ( )
inline

Get the message's type's descriptor. This differs from the

getDescriptor()

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

interface whereas

getDescriptor()

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

Implements com.google.protobuf.MessageOrBuilder.

◆ getField()

Object com.google.protobuf.DynamicMessage.getField ( FieldDescriptor  field)
inline

◆ getOneofFieldDescriptor()

FieldDescriptor com.google.protobuf.DynamicMessage.getOneofFieldDescriptor ( OneofDescriptor  oneof)
inline

◆ getParserForType()

Parser<DynamicMessage> com.google.protobuf.DynamicMessage.getParserForType ( )
inline

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

Implements com.google.protobuf.Message.

◆ getRepeatedField()

Object com.google.protobuf.DynamicMessage.getRepeatedField ( FieldDescriptor  field,
int  index 
)
inline

◆ getRepeatedFieldCount()

int com.google.protobuf.DynamicMessage.getRepeatedFieldCount ( FieldDescriptor  field)
inline

◆ getSerializedSize()

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

Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that.

Implements com.google.protobuf.MessageLite.

◆ getUnknownFields()

UnknownFieldSet com.google.protobuf.DynamicMessage.getUnknownFields ( )
inline

Get the UnknownFieldSet for this message.

Implements com.google.protobuf.MessageOrBuilder.

◆ hasField()

boolean com.google.protobuf.DynamicMessage.hasField ( FieldDescriptor  field)
inline

◆ hasOneof()

boolean com.google.protobuf.DynamicMessage.hasOneof ( OneofDescriptor  oneof)
inline

◆ isInitialized()

boolean com.google.protobuf.DynamicMessage.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.

◆ newBuilder() [1/2]

static Builder com.google.protobuf.DynamicMessage.newBuilder ( Descriptor  type)
inlinestatic

Construct a Message.Builder for the given type.

◆ newBuilder() [2/2]

static Builder com.google.protobuf.DynamicMessage.newBuilder ( Message  prototype)
inlinestatic

Construct a Message.Builder for a message of the same type as

prototype

, and initialize it with

prototype

's contents.

◆ newBuilderForType()

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

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

Implements com.google.protobuf.Message.

◆ parseFrom() [1/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
CodedInputStream  input 
) throws IOException
inlinestatic

Parse a message of the given type from the given input stream.

◆ parseFrom() [2/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
CodedInputStream  input,
ExtensionRegistry  extensionRegistry 
) throws IOException
inlinestatic

Parse a message of the given type from the given input stream.

◆ parseFrom() [3/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
ByteString  data 
) throws InvalidProtocolBufferException
inlinestatic

Parse

as a message of the given type and return it.

◆ parseFrom() [4/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
ByteString  data,
ExtensionRegistry  extensionRegistry 
) throws InvalidProtocolBufferException
inlinestatic

Parse

as a message of the given type and return it.

◆ parseFrom() [5/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
byte []  data 
) throws InvalidProtocolBufferException
inlinestatic

Parse

as a message of the given type and return it.

◆ parseFrom() [6/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
byte []  data,
ExtensionRegistry  extensionRegistry 
) throws InvalidProtocolBufferException
inlinestatic

Parse

as a message of the given type and return it.

◆ parseFrom() [7/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
InputStream  input 
) throws IOException
inlinestatic

Parse a message of the given type from

and return it.

◆ parseFrom() [8/8]

static DynamicMessage com.google.protobuf.DynamicMessage.parseFrom ( Descriptor  type,
InputStream  input,
ExtensionRegistry  extensionRegistry 
) throws IOException
inlinestatic

Parse a message of the given type from

and return it.

◆ toBuilder()

Builder com.google.protobuf.DynamicMessage.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.Message.

◆ writeTo()

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

Serializes the message and writes it to

. This does not flush or close the stream.

Implements com.google.protobuf.MessageLite.


The documentation for this class was generated from the following file: