public abstract class AbstractMessage extends AbstractMessageLite implements Message
Message
interface which implements
as many methods of that interface as possible in terms of other methods.Modifier and Type | Class and Description |
---|---|
static class |
AbstractMessage.Builder<BuilderType extends AbstractMessage.Builder>
A partial implementation of the
Message.Builder interface which
implements as many methods of that interface as possible in terms of
other methods. |
Constructor and Description |
---|
AbstractMessage() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Compares the specified object with this message for equality.
|
java.util.List<java.lang.String> |
findInitializationErrors()
Returns a list of field paths (e.g.
|
java.lang.String |
getInitializationErrorString()
Returns a comma-delimited list of required fields which are not set
in this message object.
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
int |
hashCode()
Returns the hash code value for this message.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
java.lang.String |
toString()
Converts the message to a string in protocol buffer text format.
|
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output . |
toByteArray, toByteString, writeDelimitedTo, writeTo
getParserForType, newBuilderForType, toBuilder
toByteArray, toByteString, writeDelimitedTo, writeTo
getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField
public boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
public java.util.List<java.lang.String> findInitializationErrors()
MessageOrBuilder
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.findInitializationErrors
in interface MessageOrBuilder
public java.lang.String getInitializationErrorString()
MessageOrBuilder
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.getInitializationErrorString
in interface MessageOrBuilder
public final java.lang.String toString()
Message
TextFormat.printToString(MessageOrBuilder)
.public void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
java.io.IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
public boolean equals(java.lang.Object other)
Message
true
if the given object is a message of the same type (as
defined by getDescriptorForType()
) and has identical values for
all of its fields. Subclasses must implement this; inheriting
Object.equals()
is incorrect.public int hashCode()
Message
Object.hashCode()
is incorrect.