@Retention(value=CLASS)
@Target(value=METHOD)
public @interface CWrapCondition
When wrapping a method call:
When wrapping a field:
Example usage:
@CWrapCondition(method = "print", target = @CTarget(value = "INVOKE", target = "..."))
public boolean condition(Object instance, String arg) {
// Return true or false based on some condition
}
If your target has to be chosen more precisely you can use a slice() to narrow down the search.CSlice,
GitHub Wiki| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String[] |
method
The method name and descriptor to inject into.
This supports multiple targets and wildcards. e.g. |
CTarget[] |
target
The target which should be wrapped with a condition.
This can be used to wrap multiple targets at once. |
public abstract java.lang.String[] method
print(Ljava/lang/String;)V or print*public abstract CTarget[] target
public abstract CSlice slice