Skip to content

Commit 1b3616d

Browse files
Internal change
PiperOrigin-RevId: 806292995
1 parent f964a0a commit 1b3616d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

content/reference/java/java-generated.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)