@Override public Map<FieldDescriptor, Object> getAllFields() { return Collections.unmodifiableMap( getAllFieldsMutable(/* getBytesForString = */ false)); }
/** * 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 * {@link #getFieldRaw(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. */ Map<FieldDescriptor, Object> getAllFieldsRaw() { return Collections.unmodifiableMap( getAllFieldsMutable(/* getBytesForString = */ true)); }