Top Description Inners Constructors Methods
com.google.protobuf

pack-priv Class MessageReflection

extends Object
Class Inheritance
Imports
com.google.protobuf.Descriptors.FieldDescriptor, java.io.IOException, java.util.ArrayList, .List, .Map, .TreeMap

Reflection utility methods shared by both mutable and immutable messages.
Author
[email protected] (Pherl Liu)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static interface

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
private static void
private static void
findMissingFields(final MessageOrBuilder message, final String prefix, final List<String> results)

pack-priv static List<String>
findMissingFields(final MessageOrBuilder message)

Populates this.missingFields with the full "path" of each missing required field in the given message.

pack-priv static int
pack-priv static boolean
pack-priv static boolean

Returns:

true unless the tag is an end-group tag.
mergeFieldFrom
(CodedInputStream input, UnknownFieldSet.Builder
If not null, unknown fields will be merged to this UnknownFieldSet, otherwise unknown fields will be discarded.
unknownFields
,
ExtensionRegistryLite extensionRegistry, Descriptors.Descriptor type, MessageReflection.MergeTarget target, int
The tag, which should have already been read.
tag
)

Parses a single field into MergeTarget.

private static void
private static void
mergeMessageSetExtensionFromCodedStream(CodedInputStream input, UnknownFieldSet.Builder unknownFields, ExtensionRegistryLite extensionRegistry, Descriptors.Descriptor type, MessageReflection.MergeTarget target)

Called by #mergeFieldFrom() to parse a MessageSet extension into MergeTarget.

private static String
subMessagePrefix(final String prefix, final Descriptors.FieldDescriptor field, final int index)

pack-priv static void
writeMessageTo(Message message, Map<Descriptors.FieldDescriptor, Object> fields, CodedOutputStream output, boolean alwaysWriteRequiredFields)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait