File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -674,6 +674,15 @@ class Any {
674674 // Checks whether this Any message’s payload is the given type.
675675 public <T extends Message > boolean is (class <T > clazz );
676676
677+ // Checks whether this Any message’s payload has the same type as the given
678+ // message.
679+ public boolean isSameTypeAs (Message message );
680+
681+ // Unpacks Any into a message with the same type as the given messsage.
682+ // Throws exception if the type doesn’t match or parsing the payload fails.
683+ public <T extends Message > T unpackSameTypeAs (T message )
684+ throws InvalidProtocolBufferException ;
685+
677686 // Unpacks Any into the given message type. Throws exception if
678687 // the type doesn’t match or parsing the payload has failed.
679688 public <T extends Message > T unpack (class <T > clazz )
You can’t perform that action at this time.
0 commit comments