Package net.bytebuddy.asm
Class Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying
- java.lang.Object
-
- net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default
-
- net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying
-
- All Implemented Interfaces:
Advice.ArgumentHandler
,Advice.ArgumentHandler.ForInstrumentedMethod
- Enclosing class:
- Advice.ArgumentHandler.ForInstrumentedMethod.Default
@Enhance protected static class Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying extends Advice.ArgumentHandler.ForInstrumentedMethod.Default
An argument handler for an instrumented method that copies all arguments before executing the instrumented method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default
Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying, Advice.ArgumentHandler.ForInstrumentedMethod.Default.Simple
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethod
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod
Advice.ArgumentHandler.ForInstrumentedMethod.Default
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default
enterType, exitType, instrumentedMethod, namedTypes
-
Fields inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
THIS_REFERENCE
-
-
Constructor Summary
Constructors Modifier Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
argument(int offset)
Resolves an offset relative to an offset of the instrumented method.boolean
isCopyingArguments()
Returnstrue
if the original arguments are copied before invoking the instrumented method.int
prepare(org.objectweb.asm.MethodVisitor methodVisitor)
Prepares this argument handler for future offset access.int
variable(int index)
Resolves a local variable index.-
Methods inherited from class net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default
bindEnter, bindExit, enter, exit, getNamedTypes, named, returned, thrown
-
-
-
-
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 orvoid
if no exit type is defined.namedTypes
- A mapping of all available local variables by their name to their type.enterType
- The enter type orvoid
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()
Returnstrue
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.
-
-