Classes | |
class | Builder |
class | Metadata |
Static Public Member Functions | |
static< K, V > MapEntry< K, V > | newDefaultInstance (Descriptor descriptor, WireFormat.FieldType keyType, K defaultKey, WireFormat.FieldType valueType, V defaultValue) |
Private Member Functions | |
void | checkFieldDescriptor (FieldDescriptor field) |
MapEntry (Descriptor descriptor, WireFormat.FieldType keyType, K defaultKey, WireFormat.FieldType valueType, V defaultValue) | |
MapEntry (Metadata metadata, K key, V value) | |
MapEntry (Metadata< K, V > metadata, CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException | |
Static Private Member Functions | |
static< V > boolean | isInitialized (Metadata metadata, V value) |
Private Attributes | |
volatile int | cachedSerializedSize = -1 |
final K | key |
final Metadata< K, V > | metadata |
final V | value |
Implements MapEntry messages.
In reflection API, map fields will be treated as repeated message fields and each map entry is accessed as a message. This MapEntry class is used to represent these map entry messages in reflection API.
Protobuf internal. Users shouldn't use this class.
Definition at line 50 of file MapEntry.java.
|
inlineprivate |
Create a default MapEntry instance.
Definition at line 82 of file MapEntry.java.
|
inlineprivate |
Create a MapEntry with the provided key and value.
Definition at line 95 of file MapEntry.java.
|
inlineprivate |
Parsing constructor.
Definition at line 102 of file MapEntry.java.
|
inlineprivate |
Definition at line 198 of file MapEntry.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 188 of file MapEntry.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 178 of file MapEntry.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 183 of file MapEntry.java.
|
inline |
Definition at line 217 of file MapEntry.java.
|
inline |
Definition at line 131 of file MapEntry.java.
|
inline |
Gets the parser for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 163 of file MapEntry.java.
|
inline |
Definition at line 233 of file MapEntry.java.
|
inline |
Definition at line 228 of file MapEntry.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 142 of file MapEntry.java.
|
inline |
Get the UnknownFieldSet for this message.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 238 of file MapEntry.java.
|
inline |
Definition at line 135 of file MapEntry.java.
|
inline |
Definition at line 209 of file MapEntry.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 158 of file MapEntry.java.
|
inlinestaticprivate |
Definition at line 446 of file MapEntry.java.
|
inline |
Constructs a new builder for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 168 of file MapEntry.java.
|
inlinestatic |
|
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 173 of file MapEntry.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 153 of file MapEntry.java.
|
private |
Definition at line 139 of file MapEntry.java.
|
private |
Definition at line 77 of file MapEntry.java.
|
private |
Definition at line 79 of file MapEntry.java.
|
private |
Definition at line 78 of file MapEntry.java.