Annotation Type Handle


@Documented @Retention(RUNTIME) @Target(PARAMETER) public @interface Handle

Binds a method handle in the context of the instrumented method.

Important: Don't confuse this annotation with Advice.Handle or MemberSubstitution.Handle. This annotation should be used with MethodDelegation only.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Binds a Handle annotation.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the name of the method handle.
    Class<?>[]
    Returns the parameter types of the method handle.
    Returns the return type of the method handle.
    Returns the type of the method handle to resolve.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the owner type of the method handle, or void, to represent the instrumented type.
  • Element Details

    • type

      Returns the type of the method handle to resolve.
      Returns:
      The type of the method handle to resolve.
    • owner

      Class<?> owner
      Returns the owner type of the method handle, or void, to represent the instrumented type.
      Returns:
      The owner type of the method handle, or void, to represent the instrumented type.
      Default:
      void.class
    • name

      String name
      Returns the name of the method handle.
      Returns:
      The name of the method handle.
    • returnType

      Class<?> returnType
      Returns the return type of the method handle.
      Returns:
      The return type of the method handle.
    • parameterTypes

      Class<?>[] parameterTypes
      Returns the parameter types of the method handle.
      Returns:
      The parameter types of the method handle.