diff options
Diffstat (limited to 'java/src/main/java/com/google/protobuf/Message.java')
-rw-r--r-- | java/src/main/java/com/google/protobuf/Message.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/src/main/java/com/google/protobuf/Message.java b/java/src/main/java/com/google/protobuf/Message.java index 2b881413..19fc3b42 100644 --- a/java/src/main/java/com/google/protobuf/Message.java +++ b/java/src/main/java/com/google/protobuf/Message.java @@ -53,6 +53,7 @@ public interface Message extends MessageLite, MessageOrBuilder { // (From MessageLite, re-declared here only for return type covariance.) Parser<? extends Message> getParserForType(); + // ----------------------------------------------------------------- // Comparison and hashing @@ -180,6 +181,12 @@ public interface Message extends MessageLite, MessageOrBuilder { Builder clearField(Descriptors.FieldDescriptor field); /** + * Clears the oneof. This is exactly equivalent to calling the generated + * "clear" accessor method corresponding to the oneof. + */ + Builder clearOneof(Descriptors.OneofDescriptor oneof); + + /** * Sets an element of a repeated field to the given value. The value must * be of the correct type for this field, i.e. the same type that * {@link Message#getRepeatedField(Descriptors.FieldDescriptor,int)} would |