Annotation Type Advice.Exit


  • @Documented
    @Retention(RUNTIME)
    @Target(PARAMETER)
    public static @interface Advice.Exit
    Indicates that the annotated parameter should be mapped to the value that is returned by the advice method that is annotated by Advice.OnMethodExit. Before the exit advice returns for the first time, this parameter is initialized to its type's default value.
    See Also:
    Advice, Advice.OnMethodExit
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean readOnly
      Indicates if it is possible to write to this parameter.
      Assigner.Typing typing
      The typing that should be applied when assigning the exit value.
    • Element Detail

      • readOnly

        boolean readOnly

        Indicates if it is possible to write to this parameter. If this property is set to false, the annotated type must be equal to the type declaring the instrumented method if the typing is not also set to Assigner.Typing.DYNAMIC. If this property is set to true, the annotated parameter can be any super type of the instrumented method's declaring type.

        Important: This property must be set to true if the advice method is not inlined.

        Returns:
        true if this parameter is read-only.
        Default:
        true
      • typing

        Assigner.Typing typing
        The typing that should be applied when assigning the exit value.
        Returns:
        The typing to apply upon assignment.
        Default:
        net.bytebuddy.implementation.bytecode.assign.Assigner.Typing.STATIC