@Retention(value=CLASS)
@Target(value={METHOD,CONSTRUCTOR})
public @interface CASM
void.shift() value to CASM.Shift.BOTTOM.
@CASM
public static void inject(ClassNode classNode) {
//Do something with the class node
}
Injecting into a method:
@CASM("print")
public static void inject(MethodNode methodNode) {
//Do something with the method node
}
| Modifier and Type | Optional Element and Description |
|---|---|
CASM.Shift |
shift
The shift of the CASM injection (before or after the other transformer).
|
java.lang.String[] |
value
The method name and descriptor to inject into.
This supports multiple targets and wildcards. To get the class node keep the target empty. e.g. |
public abstract java.lang.String[] value
print(Ljava/lang/String;)V or print*public abstract CASM.Shift shift