Package net.bytebuddy.asm
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.
-
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.SimpleNested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethodNested 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, namedTypesFields inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
THIS_REFERENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimple(MethodDescription instrumentedMethod, TypeDefinition exitType, SortedMap<String, TypeDefinition> namedTypes, TypeDefinition enterType) Creates a new simple 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 net.bytebuddy.asm.Advice.ArgumentHandler.ForInstrumentedMethod.Default
bindEnter, bindExit, enter, exit, getNamedTypes, named, returned, thrown
-
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 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.
-