Class Advice.Dispatcher.RelocationHandler.ForValue.Bound

java.lang.Object
net.bytebuddy.asm.Advice.Dispatcher.RelocationHandler.ForValue.Bound
All Implemented Interfaces:
Advice.Dispatcher.RelocationHandler.Bound
Enclosing class:
Advice.Dispatcher.RelocationHandler.ForValue

@Enhance(includeSyntheticFields=true) protected class Advice.Dispatcher.RelocationHandler.ForValue.Bound extends Object implements Advice.Dispatcher.RelocationHandler.Bound
A bound relocation handler for Advice.Dispatcher.RelocationHandler.ForValue.
  • Field Details

    • instrumentedMethod

      private final MethodDescription instrumentedMethod
      The instrumented method.
    • relocation

      The relocation to apply.
    • inverted

      private final boolean inverted
      true if the relocation should be applied for any non-default value of a type.
  • Constructor Details

    • Bound

      protected Bound(MethodDescription instrumentedMethod, Advice.Dispatcher.RelocationHandler.Relocation relocation, boolean inverted)
      Creates a new bound relocation handler.
      Parameters:
      instrumentedMethod - The instrumented method.
      relocation - The relocation to apply.
      inverted - true if the relocation should be applied for any non-default value of a type.
  • Method Details

    • apply

      public int apply(org.objectweb.asm.MethodVisitor methodVisitor, int offset)
      Applies this relocation handler.
      Specified by:
      apply in interface Advice.Dispatcher.RelocationHandler.Bound
      Parameters:
      methodVisitor - The method visitor to use.
      offset - The offset of the relevant value.
      Returns:
      The minimal required stack size to apply this relocation handler.