Annotation Type Advice.Local

Enclosing class:
Advice

@Documented @Retention(RUNTIME) @Target(PARAMETER) public static @interface Advice.Local
Declares the annotated parameter as a local variable that is created by Byte Buddy for the instrumented method. The local variable can be both read and written by advice methods with Advice.OnMethodEnter and Advice.OnMethodExit annotation and are uniquely identified by their name. However, if a local variable is referenced from an exit advice method, it must also be declared by an enter advice method. It is possible to annotate multiple parameters of an advice method with local variables of the same name as long as all annotated parameters share the same parameter type. All local variables are initialized with their default value which is 0 value for primitive types and null for reference types.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the local variable that the annotated parameter references.
  • Element Details

    • value

      String value
      The name of the local variable that the annotated parameter references.
      Returns:
      The name of the local variable that the annotated parameter references.