@Retention(value=CLASS)
@Target(value=METHOD)
public @interface CRedirect
When redirecting a method call:
When redirecting a field access:
@CRedirect(method = "print", target = @CTarget(value = "INVOKE", target = "..."))
public String redirect(Object instance, int arg1, String arg2) {
//Do something with the arguments and return the new value
}
Redirecting a field access:
@CRedirect(method = "print", target = @CTarget(value = "GETFIELD", target = "..."))
public String redirect(Object instance) {
//Do something with the instance and return the new value
}
See CTarget for more information about targets.slice() to narrow down the search.CTarget,
CSlice,
GitHub Wikipublic abstract java.lang.String[] method
print(Ljava/lang/String;)V or print*public abstract CTarget target
public abstract CSlice slice