Skip to content

Commit 78218f2

Browse files
cpovirkError Prone Team
authored and
Error Prone Team
committed
Write more about withSignature.
(prompted by unknown commit) PiperOrigin-RevId: 667597716
1 parent 90d9390 commit 78218f2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
`withSignature` replies on the string representation of internal classes in the
2+
javac implementation. Those string representations are not necessarily stable
3+
across versions of javac, and they can change when a method is annotated with
4+
type-use annotations.
5+
6+
Additionally, `withSignature` currently has at least one undocumented behavioral
7+
quirk.
8+
9+
The most reasonable use case for `withSignature` is for methods that declare or
10+
use type variables, which are difficult or impossible to express with the rest
11+
of the `MethodMatchers` API. Still, where practical, prefer to write your own
12+
matching code instead of using `withSignature`.

0 commit comments

Comments
 (0)