@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public static @interface Advice.Handle
Indicates that the annotated parameter should load a java.lang.invoke.MethodHandle
that represents
a method invocation, constructor invocation or field access.
Important: Don't confuse this annotation with MemberSubstitution.Handle
or
Handle
. This annotation should be used only in combination
with Advice
.
Advice
,
Advice.OnMethodEnter
,
Advice.OnMethodExit
Modifier and Type | Required Element and Description |
---|---|
String |
name
Returns the name of the method handle.
|
Class<?>[] |
parameterTypes
Returns the parameter types of the method handle.
|
Class<?> |
returnType
Returns the return type of the method handle.
|
JavaConstant.MethodHandle.HandleType |
type
Returns the type of the method handle to resolve.
|
public abstract JavaConstant.MethodHandle.HandleType type
public abstract String name
public abstract Class<?> returnType
public abstract Class<?>[] parameterTypes
public abstract Class<?> owner
void
, to represent the instrumented type.void
, to represent the instrumented type.Copyright © 2014–2025. All rights reserved.