Class Advice.Delegator.ForRegularInvocation

java.lang.Object
net.bytebuddy.asm.Advice.Delegator.ForRegularInvocation
All Implemented Interfaces:
Advice.Delegator
Enclosing interface:
Advice.Delegator

@Enhance public static class Advice.Delegator.ForRegularInvocation extends Object implements Advice.Delegator
Invokes an advice method using a regular method call.
  • Field Details

  • Constructor Details

    • ForRegularInvocation

      protected ForRegularInvocation(MethodDescription.InDefinedShape adviceMethod)
      Creates a delegator for a regular invocation.
      Parameters:
      adviceMethod - The advice method.
  • Method Details

    • apply

      public StackManipulation apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
      Materializes an invocation.
      Specified by:
      apply in interface Advice.Delegator
      Parameters:
      instrumentedType - The instrumented type.
      instrumentedMethod - The instrumented method.
      Returns:
      An appropriate stack manipulation which needs to consume all arguments for the advice method and needs to provide a compatible return type.
    • getTypeToken

      public MethodDescription.TypeToken getTypeToken()
      Returns the advice method's type token.
      Specified by:
      getTypeToken in interface Advice.Delegator
      Returns:
      The advice method's type token.
    • assertVisibility

      public void assertVisibility(TypeDescription instrumentedType)
      Asserts the visibility of the delegation target.
      Specified by:
      assertVisibility in interface Advice.Delegator
      Parameters:
      instrumentedType - The instrumented type.