Classes | |
class | Builder |
Private Member Functions | |
void | verifyContainingType (FieldDescriptor field) |
void | verifyOneofContainingType (OneofDescriptor oneof) |
Private Attributes | |
final FieldSet< FieldDescriptor > | fields |
int | memoizedSize = -1 |
final FieldDescriptor[] | oneofCases |
final Descriptor | type |
final UnknownFieldSet | unknownFields |
An implementation of Message that can represent arbitrary types, given a {}. kento Kenton Varda n@go ogle. com
Definition at line 51 of file DynamicMessage.java.
|
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.
Definition at line 166 of file DynamicMessage.java.
|
inlinestatic |
Get a
representing the default instance of the given type.
Definition at line 78 of file DynamicMessage.java.
|
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
interface whereas
is a static method of a specific class. They return the same thing.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 161 of file DynamicMessage.java.
|
inline |
Get the message's type's descriptor. This differs from the
method of generated message classes in that this method is an abstract method of the
interface whereas
is a static method of a specific class. They return the same thing.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 156 of file DynamicMessage.java.
|
inline |
Definition at line 193 of file DynamicMessage.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 181 of file DynamicMessage.java.
|
inline |
Gets the parser for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 283 of file DynamicMessage.java.
|
inline |
Definition at line 215 of file DynamicMessage.java.
|
inline |
Definition at line 209 of file DynamicMessage.java.
|
inline |
Get the number of bytes required to encode this message. The result is only computed on the first call and memoized after that.
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 256 of file DynamicMessage.java.
|
inline |
Get the UnknownFieldSet for this message.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 221 of file DynamicMessage.java.
|
inline |
Definition at line 187 of file DynamicMessage.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 171 of file DynamicMessage.java.
|
inline |
Returns true if all required fields in the message and all embedded messages are set, false otherwise.
See also: MessageOrBuilder#getInitializationErrorString()
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 240 of file DynamicMessage.java.
|
inlinestatic |
Construct a Message.Builder for the given type.
Definition at line 140 of file DynamicMessage.java.
Construct a Message.Builder for a message of the same type as
, and initialize it with
's contents.
Definition at line 148 of file DynamicMessage.java.
|
inline |
Constructs a new builder for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 273 of file DynamicMessage.java.
|
inlinestatic |
Parse
as a message of the given type and return it.
Definition at line 116 of file DynamicMessage.java.
|
inlinestatic |
Parse
as a message of the given type and return it.
Definition at line 122 of file DynamicMessage.java.
|
inlinestatic |
Parse
as a message of the given type and return it.
Definition at line 103 of file DynamicMessage.java.
|
inlinestatic |
Parse
as a message of the given type and return it.
Definition at line 109 of file DynamicMessage.java.
|
inlinestatic |
Parse a message of the given type from the given input stream.
Definition at line 90 of file DynamicMessage.java.
|
inlinestatic |
Parse a message of the given type from the given input stream.
Definition at line 96 of file DynamicMessage.java.
|
inlinestatic |
Parse a message of the given type from
and return it.
Definition at line 129 of file DynamicMessage.java.
|
inlinestatic |
Parse a message of the given type from
and return it.
Definition at line 134 of file DynamicMessage.java.
|
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.
Definition at line 278 of file DynamicMessage.java.
|
inlineprivate |
Verifies that the field is a field of this message.
Definition at line 303 of file DynamicMessage.java.
|
inlineprivate |
Verifies that the oneof is an oneof of this message.
Definition at line 310 of file DynamicMessage.java.
|
inline |
Serializes the message and writes it to
. This does not flush or close the stream.
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 245 of file DynamicMessage.java.
|
private |
Definition at line 53 of file DynamicMessage.java.
|
private |
Definition at line 56 of file DynamicMessage.java.
|
private |
Definition at line 54 of file DynamicMessage.java.
|
private |
Definition at line 52 of file DynamicMessage.java.
|
private |
Definition at line 55 of file DynamicMessage.java.