Class Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying

    • Constructor Detail

      • Copying

        protected Copying​(MethodDescription instrumentedMethod,
                          TypeDefinition exitType,
                          java.util.TreeMap<java.lang.String,​TypeDefinition> namedTypes,
                          TypeDefinition enterType)
        Creates a new copying 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 Detail

      • 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.
      • variable

        public int variable​(int index)
        Resolves a local variable index.
        Parameters:
        index - The index to resolve.
        Returns:
        The resolved local variable index.
      • 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.