Classes | |
class | Builder |
Private Attributes | |
final Message | wrappedMessage |
Extends AbstractMessage and wraps some other message object. The methods of the Message interface which aren't explicitly implemented by AbstractMessage are forwarded to the wrapped object. This allows us to test that AbstractMessage's implementations work even if the wrapped object does not use them.
Definition at line 61 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Definition at line 64 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.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 79 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.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 74 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.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 69 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Obtains the value of the given field, or the default value if it is not set. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned. For repeated fields, a java.util.List is returned.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 89 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Gets the parser for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 227 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Gets an element of a repeated field. For primitive fields, the boxed primitive value is returned. For enum fields, the EnumValueDescriptor for the value is returned. For embedded message fields, the sub-message is returned.
IllegalArgumentException | The field is not a repeated field, or field.getContainingType() != getDescriptorForType()
|
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 99 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Gets the number of elements of a repeated field. This is exactly equivalent to calling the generated "Count" accessor method corresponding to the field.
IllegalArgumentException | The field is not a repeated field, or field.getContainingType() != getDescriptorForType()
|
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 94 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Get the UnknownFieldSet for this message.
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 104 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Returns true if the given field is set. This is exactly equivalent to calling the generated "has" accessor method corresponding to the field.
IllegalArgumentException | The field is a repeated field, or field.getContainingType() != getDescriptorForType()
|
Implements com.google.protobuf.MessageOrBuilder.
Definition at line 84 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
inline |
Constructs a new builder for a message of the same type as this message.
Implements com.google.protobuf.Message.
Definition at line 109 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.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 114 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.
|
private |
Definition at line 62 of file core/src/test/java/com/google/protobuf/AbstractMessageTest.java.