@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public static @interface Advice.OnMethodEnter
Indicates that this method should be inlined before the matched method is invoked. Any class must declare
at most one method with this annotation. The annotated method must be static. When instrumenting constructors,
this values can only be accessed for writing fields but not for reading fields or invoking methods.
The annotated method can return a value that is made accessible to another method annotated by
|Modifier and Type||Optional Element and Description|
Determines if the annotated method should be inlined into the instrumented method or invoked from it.
If set to
Determines if the execution of the instrumented method should be skipped.
Indicates that this advice should suppress any
public abstract Class<?> skipOn
Determines if the execution of the instrumented method should be skipped. This does not include any exit advice.
When specifying a non-primitive type, this method's return value that is subject to an
instanceof check where
the instrumented method is only executed, if the returned instance is
not an instance of the specified class.
Alternatively, it is possible to specify either
Advice.OnNonDefaultValue where the instrumented
method is only executed if the advice method returns a default or non-default value of the advice method's return type.
It is illegal to specify a primitive type as an argument whereas setting the value to
void indicates that the
instrumented method should never be skipped.
Important: Constructors cannot be skipped.
voidif the instrumented method should never be skipped.
public abstract boolean prependLineNumber
true, the instrumented method's line number information is adjusted such that stack traces generated within this advice method appear as if they were generated within the first line of the instrumented method. If set to
false, no line number information is made available for such stack traces.
trueif this advice code should appear as if it was added within the first line of the instrumented method.
public abstract boolean inline
trueif the annotated method should be inlined into the instrumented method.
Throwabletype being thrown during the advice's execution. By default, any such exception is silently suppressed. Custom behavior can be configured by using
Copyright © 2014–2019. All rights reserved.