Class Advice.ArgumentHandler.ForInstrumentedMethod.Default.Simple

java.lang.Object
net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default
net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default.Simple
All Implemented Interfaces:
Advice.ArgumentHandler, Advice.ArgumentHandler.ForInstrumentedMethod
Enclosing class:
Advice.ArgumentHandler.ForInstrumentedMethod.Default

@Enhance protected static class Advice.ArgumentHandler.ForInstrumentedMethod.Default.Simple extends Advice.ArgumentHandler.ForInstrumentedMethod.Default
A simple argument handler for an instrumented method.
  • Constructor Details

    • Simple

      protected Simple(MethodDescription instrumentedMethod, TypeDefinition exitType, SortedMap<String,TypeDefinition> namedTypes, TypeDefinition enterType)
      Creates a new simple argument handler for an instrumented method.
      Parameters:
      instrumentedMethod - The instrumented method.
      exitType - The exit type or void if no exit type is defined.
      namedTypes - A mapping of all available local variables by their name to their type.
      enterType - The enter type or void if no enter type is defined.
  • Method Details

    • argument

      public int argument(int offset)
      Resolves an offset relative to an offset of the instrumented method.
      Parameters:
      offset - The offset to resolve.
      Returns:
      The resolved offset.
    • isCopyingArguments

      public boolean isCopyingArguments()
      Returns true if the original arguments are copied before invoking the instrumented method.
      Returns:
      true if the original arguments are copied before invoking the instrumented method.
    • prepare

      public int prepare(org.objectweb.asm.MethodVisitor methodVisitor)
      Prepares this argument handler for future offset access.
      Parameters:
      methodVisitor - The method visitor to which to write any potential byte code.
      Returns:
      The minimum stack size that is required to apply this manipulation.