webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
com.google.protobuf.AbstractMessage Class Referenceabstract
Inheritance diagram for 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 com.google.protobuf.DynamicMessage com.google.protobuf.GeneratedMessage com.google.protobuf.MapEntry< K, V >

Classes

class  Builder
 

Public Member Functions

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.Message
Parser<? extends MessagegetParserForType ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
- Public Member Functions inherited from com.google.protobuf.MessageOrBuilder
Message getDefaultInstanceForType ()
 
Descriptors.Descriptor getDescriptorForType ()
 
Map< Descriptors.FieldDescriptor, ObjectgetAllFields ()
 
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)
 
UnknownFieldSet getUnknownFields ()
 

Static Protected Member Functions

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

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

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

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

Member Function Documentation

◆ equals()

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

Compares the specified object with this message for equality. Returns

true

if the given object is a message of the same type (as defined by

) and has identical values for all of its fields. Subclasses must implement this; inheriting

Object.equals()

is incorrect.

Parameters
otherobject to be compared for equality with this message
Returns
true
if the specified object is equal to this message

Implements com.google.protobuf.Message.

◆ findInitializationErrors()

List<String> com.google.protobuf.AbstractMessage.findInitializationErrors ( )
inline

Returns a list of field paths (e.g. "foo.bar.baz") of required fields which are not set in this message. You should call MessageLiteOrBuilder#isInitialized() first to check if there are any missing fields, as that method is likely to be much faster than this one even when the message is fully-initialized.

Implements com.google.protobuf.MessageOrBuilder.

◆ getInitializationErrorString()

String com.google.protobuf.AbstractMessage.getInitializationErrorString ( )
inline

Returns a comma-delimited list of required fields which are not set in this message object. You should call MessageLiteOrBuilder#isInitialized() first to check if there are any missing fields, as that method is likely to be much faster than this one even when the message is fully-initialized.

Implements com.google.protobuf.MessageOrBuilder.

◆ getOneofFieldDescriptor()

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

TODO(jieluo): Clear it when all subclasses have implemented this method.

◆ getSerializedSize()

int com.google.protobuf.AbstractMessage.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.

◆ hashCode()

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

Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting

Object.hashCode()

is incorrect.

Returns
the hash code value for this message
See also
Map::hashCode()

Implements com.google.protobuf.Message.

◆ hashFields()

static int com.google.protobuf.AbstractMessage.hashFields ( int  hash,
Map< FieldDescriptor, Object map 
)
inlinestaticprotected

Get a hash code for given fields and values, using the given seed.

◆ hasOneof()

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

TODO(jieluo): Clear it when all subclasses have implemented this method.

◆ isInitialized()

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

◆ toString()

final String com.google.protobuf.AbstractMessage.toString ( )
inline

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

Implements com.google.protobuf.Message.

◆ writeTo()

void com.google.protobuf.AbstractMessage.writeTo ( final 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.

Member Data Documentation

◆ memoizedSize

int com.google.protobuf.AbstractMessage.memoizedSize = -1
protected

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