|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageOrBuilder
Base interface for methods common to Message
and
Message.Builder
to provide type equivalency.
Method Summary | |
---|---|
java.util.Map<Descriptors.FieldDescriptor,java.lang.Object> |
getAllFields()
Returns a collection of all the fields in this message which are set and their corresponding values. |
Message |
getDefaultInstanceForType()
Get an instance of the type with no fields set. |
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor. |
java.lang.Object |
getField(Descriptors.FieldDescriptor field)
Obtains the value of the given field, or the default value if it is not set. |
java.lang.Object |
getRepeatedField(Descriptors.FieldDescriptor field,
int index)
Gets an element of a repeated field. |
int |
getRepeatedFieldCount(Descriptors.FieldDescriptor field)
Gets the number of elements of a repeated field. |
UnknownFieldSet |
getUnknownFields()
Get the UnknownFieldSet for this message. |
boolean |
hasField(Descriptors.FieldDescriptor field)
Returns true if the given field is set. |
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder |
---|
isInitialized |
Method Detail |
---|
Message getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
method of generated message classes in that
this method is an abstract method of the MessageLite
interface
whereas getDefaultInstance()
is a static method of a specific
class. They return the same thing.
getDefaultInstanceForType
in interface MessageLiteOrBuilder
Descriptors.Descriptor getDescriptorForType()
getDescriptor()
method of generated message classes in that
this method is an abstract method of the Message
interface
whereas getDescriptor()
is a static method of a specific class.
They return the same thing.
java.util.Map<Descriptors.FieldDescriptor,java.lang.Object> getAllFields()
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.
boolean hasField(Descriptors.FieldDescriptor field)
java.lang.IllegalArgumentException
- The field is a repeated field, or
field.getContainingType() != getDescriptorForType()
.java.lang.Object getField(Descriptors.FieldDescriptor field)
int getRepeatedFieldCount(Descriptors.FieldDescriptor field)
java.lang.IllegalArgumentException
- The field is not a repeated field, or
field.getContainingType() != getDescriptorForType()
.java.lang.Object getRepeatedField(Descriptors.FieldDescriptor field, int index)
java.lang.IllegalArgumentException
- The field is not a repeated field, or
field.getContainingType() != getDescriptorForType()
.UnknownFieldSet getUnknownFields()
UnknownFieldSet
for this message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |