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 Advice.ArgumentHandler.ForInstrumentedMethod.Default
Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying, Advice.ArgumentHandler.ForInstrumentedMethod.Default.SimpleNested classes/interfaces inherited from interface Advice.ArgumentHandler
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethodNested classes/interfaces inherited from interface Advice.ArgumentHandler.ForInstrumentedMethod
Advice.ArgumentHandler.ForInstrumentedMethod.Default -
Field Summary
Fields inherited from class Advice.ArgumentHandler.ForInstrumentedMethod.Default
enterType, exitType, instrumentedMethod, namedTypesFields inherited from interface Advice.ArgumentHandler
THIS_REFERENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCopying(MethodDescription instrumentedMethod, TypeDefinition exitType, SortedMap<String, TypeDefinition> namedTypes, TypeDefinition enterType) Creates a new copying argument handler for an instrumented method. -
Method Summary
Modifier and TypeMethodDescriptionintargument(int offset) Resolves an offset relative to an offset of the instrumented method.booleanReturnstrueif the original arguments are copied before invoking the instrumented method.intprepare(org.objectweb.asm.MethodVisitor methodVisitor) Prepares this argument handler for future offset access.Methods inherited from class Advice.ArgumentHandler.ForInstrumentedMethod.Default
bindEnter, bindExit, enter, exit, getNamedTypes, named, returned, thrown
-
Constructor Details
-
Copying
protected Copying(MethodDescription instrumentedMethod, TypeDefinition exitType, SortedMap<String, TypeDefinition> namedTypes, TypeDefinition enterType) Creates a new copying argument handler for an instrumented method.- Parameters:
instrumentedMethod- The instrumented method.exitType- The exit type orvoidif no exit type is defined.namedTypes- A mapping of all available local variables by their name to their type.enterType- The enter type orvoidif 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()Returnstrueif the original arguments are copied before invoking the instrumented method.- Returns:
trueif 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.
-