-
-
Notifications
You must be signed in to change notification settings - Fork 5
Targets
Lenni0451 edited this page Dec 16, 2023
·
1 revision
A method pattern allows matching one or multiple methods based on their name and/or descriptor.
The pattern allows the use of wildcards (*
) to target multiple methods.
Examples:
Pattern | Matches |
---|---|
* |
All methods |
test |
All methods named test
|
*test |
All methods ending with test
|
test* |
All methods starting with test
|
*test* |
All methods containing test
|
test(Z)* |
All methods named test with a single int parameter |
test(I)Z |
All methods named test with a single int parameter and a boolean return type |
*(I)Z |
All methods with a single int parameter and a boolean return type |
A method target only allows matching a single method and requires the full owner, name and descriptor.
Examples:
Ljava/lang/String;toUpperCase()Ljava/lang/String;
java/lang/String.toUpperCase()Ljava/lang/String;
A field target only allows matching a single field and requires the full owner, name and descriptor.
Examples:
Ljava/lang/Integer;MAX_VALUE#I
java/lang/Integer.MAX_VALUE#I