Classes | |
class | Builder |
interface | BuilderParent |
class | ExtendableBuilder |
class | ExtendableMessage |
interface | ExtendableMessageOrBuilder |
interface | ExtensionDescriptorRetriever |
class | FieldAccessorTable |
class | UnusedPrivateParameter |
Static Protected Member Functions | |
static boolean | canUseUnsafe () |
static int | computeStringSize (final int fieldNumber, final Object value) |
static int | computeStringSizeNoTag (final Object value) |
static BooleanList | emptyBooleanList () |
static DoubleList | emptyDoubleList () |
static FloatList | emptyFloatList () |
static IntList | emptyIntList () |
static LongList | emptyLongList () |
static BooleanList | mutableCopy (BooleanList list) |
static DoubleList | mutableCopy (DoubleList list) |
static FloatList | mutableCopy (FloatList list) |
static IntList | mutableCopy (IntList list) |
static LongList | mutableCopy (LongList list) |
static BooleanList | newBooleanList () |
static DoubleList | newDoubleList () |
static FloatList | newFloatList () |
static IntList | newIntList () |
static LongList | newLongList () |
static< M extends Message > M | parseDelimitedWithIOException (Parser< M > parser, InputStream input) throws IOException |
static< M extends Message > M | parseDelimitedWithIOException (Parser< M > parser, InputStream input, ExtensionRegistryLite extensions) throws IOException |
static< M extends Message > M | parseWithIOException (Parser< M > parser, CodedInputStream input) throws IOException |
static< M extends Message > M | parseWithIOException (Parser< M > parser, CodedInputStream input, ExtensionRegistryLite extensions) throws IOException |
static< M extends Message > M | parseWithIOException (Parser< M > parser, InputStream input) throws IOException |
static< M extends Message > M | parseWithIOException (Parser< M > parser, InputStream input, ExtensionRegistryLite extensions) throws IOException |
static< V > void | serializeBooleanMapTo (CodedOutputStream out, MapField< Boolean, V > field, MapEntry< Boolean, V > defaultEntry, int fieldNumber) throws IOException |
static< V > void | serializeIntegerMapTo (CodedOutputStream out, MapField< Integer, V > field, MapEntry< Integer, V > defaultEntry, int fieldNumber) throws IOException |
static< V > void | serializeLongMapTo (CodedOutputStream out, MapField< Long, V > field, MapEntry< Long, V > defaultEntry, int fieldNumber) throws IOException |
static< V > void | serializeStringMapTo (CodedOutputStream out, MapField< String, V > field, MapEntry< String, V > defaultEntry, int fieldNumber) throws IOException |
static void | writeString (CodedOutputStream output, final int fieldNumber, final Object value) throws IOException |
static void | writeStringNoTag (CodedOutputStream output, final Object value) throws IOException |
![]() | |
static int | hashBoolean (boolean b) |
static int | hashEnum (EnumLite e) |
static int | hashEnumList (List<? extends EnumLite > list) |
static int | hashFields (int hash, Map< FieldDescriptor, Object > map) |
static int | hashLong (long n) |
![]() | |
static< T > void | addAll (final Iterable< T > values, final Collection<? super T > list) |
static< T > void | addAll (final Iterable< T > values, final List<? super T > list) |
static void | checkByteStringIsUtf8 (ByteString byteString) throws IllegalArgumentException |
Protected Attributes | |
UnknownFieldSet | unknownFields |
![]() | |
int | memoizedSize = -1 |
![]() | |
int | memoizedHashCode = 0 |
Static Protected Attributes | |
static boolean | alwaysUseFieldBuilders = false |
Private Member Functions | |
Map< FieldDescriptor, Object > | getAllFieldsMutable (boolean getBytesForString) |
Static Private Member Functions | |
static< MessageType extends ExtendableMessage< MessageType > T Extension< MessageType, T > | checkNotLite (ExtensionLite< MessageType, T > extension) |
static Method | getMethodOrDie (final Class clazz, final String name, final Class... params) |
static Object | invokeOrDie (final Method method, final Object object, final Object... params) |
static< V > void | maybeSerializeBooleanEntryTo (CodedOutputStream out, Map< Boolean, V > m, MapEntry< Boolean, V > defaultEntry, int fieldNumber, boolean key) throws IOException |
static< K, V > void | serializeMapTo (CodedOutputStream out, Map< K, V > m, MapEntry< K, V > defaultEntry, int fieldNumber) throws IOException |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
All generated protocol message classes extend this class. This class implements most of the Message and Builder interfaces using Java reflection. Users can ignore this class and pretend that generated messages implement the Message interface directly.
Definition at line 79 of file GeneratedMessageV3.java.
|
inlineprotected |
Definition at line 93 of file GeneratedMessageV3.java.
|
inlineprotected |
Definition at line 97 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 383 of file GeneratedMessageV3.java.
|
inlinestaticprivate |
Definition at line 2816 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2825 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2833 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 443 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 429 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 415 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 387 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 401 of file GeneratedMessageV3.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.
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 229 of file GeneratedMessageV3.java.
|
inlineprivate |
Internal helper to return a modifiable map containing all the fields. The returned Map is modifialbe so that the caller can add additional extension fields to implement getAllFields().
getBytesForString | whether to generate ByteString for string fields |
Definition at line 151 of file GeneratedMessageV3.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 125 of file GeneratedMessageV3.java.
|
inline |
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 265 of file GeneratedMessageV3.java.
|
inlinestaticprivate |
Calls Class.getMethod and throws a RuntimeException if it fails.
Definition at line 1765 of file GeneratedMessageV3.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 255 of file GeneratedMessageV3.java.
|
inline |
Gets the parser for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 102 of file GeneratedMessageV3.java.
|
inline |
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 288 of file GeneratedMessageV3.java.
|
inline |
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 282 of file GeneratedMessageV3.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 464 of file GeneratedMessageV3.java.
|
inline |
Get the UnknownFieldSet for this message.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 294 of file GeneratedMessageV3.java.
|
inline |
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 260 of file GeneratedMessageV3.java.
|
inline |
TODO(jieluo): Clear it when all subclasses have implemented this method.
Reimplemented from com.google.protobuf.AbstractMessage.
Definition at line 250 of file GeneratedMessageV3.java.
|
abstractprotected |
Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
|
inlineprotected |
Gets the map field with the given field number. This method should be overridden in the generated message class if the message contains map fields.
Unlike other field types, reflection support for map fields can't be implemented based on generated public API because we need to access a map field as a list in reflection API but the generated API only allows us to access it as a map. This method returns the underlying map field directly and thus enables us to access the map field as a list.
Definition at line 1810 of file GeneratedMessageV3.java.
|
inlinestaticprivate |
Calls invoke and throws a RuntimeException if it fails.
Definition at line 1777 of file GeneratedMessageV3.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.
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 199 of file GeneratedMessageV3.java.
|
inlineprotected |
Used by parsing constructors in generated classes.
Reimplemented in com.google.protobuf.GeneratedMessageV3.ExtendableMessage< MessageType extends ExtendableMessage >.
Definition at line 503 of file GeneratedMessageV3.java.
|
inlinestaticprivate |
Definition at line 2954 of file GeneratedMessageV3.java.
|
inlineprotected |
Definition at line 129 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 451 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 437 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 423 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 395 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 409 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 447 of file GeneratedMessageV3.java.
|
abstractprotected |
TODO(xiaofeng): remove this together with GeneratedMessageV3.BuilderParent.
|
inlineprotected |
Definition at line 521 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 433 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 419 of file GeneratedMessageV3.java.
|
inlineprotected |
Creates a new instance of this message type. Overridden in the generated code.
Definition at line 496 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 391 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 405 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 365 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 374 of file GeneratedMessageV3.java.
|
inlineprotected |
Called by subclasses to parse an unknown field.
Definition at line 304 of file GeneratedMessageV3.java.
|
inlineprotected |
Delegates to parseUnknownField. This method is obsolete, but we must retain it for compatibility with older generated code.
Definition at line 320 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 347 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 356 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 329 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 338 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2939 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2859 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2886 of file GeneratedMessageV3.java.
|
inlinestaticprivate |
Serialize the map using the iteration order.
Definition at line 2971 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2913 of file GeneratedMessageV3.java.
|
inlineprotected |
Replaces this object in the output stream with a serialized form. Part of Java's serialization magic. Generated sub-classes must override this method by calling
Definition at line 2807 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2841 of file GeneratedMessageV3.java.
|
inlinestaticprotected |
Definition at line 2850 of file GeneratedMessageV3.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 459 of file GeneratedMessageV3.java.
|
staticprotected |
For testing. Allows a test to disable the optimization that avoids using field builders for nested messages until they are requested. By disabling this optimization, existing tests can be reused to test the field builders.
Definition at line 88 of file GeneratedMessageV3.java.
|
staticprivate |
Definition at line 81 of file GeneratedMessageV3.java.
|
protected |
For use by generated code only.
Definition at line 91 of file GeneratedMessageV3.java.