Package net.bytebuddy.asm
Class Advice.MethodSizeHandler.Default.WithRetainedArguments
java.lang.Object
net.bytebuddy.asm.Advice.MethodSizeHandler.Default
net.bytebuddy.asm.Advice.MethodSizeHandler.Default.WithRetainedArguments
- All Implemented Interfaces:
Advice.MethodSizeHandler
,Advice.MethodSizeHandler.ForInstrumentedMethod
- Enclosing class:
- Advice.MethodSizeHandler.Default
protected static class Advice.MethodSizeHandler.Default.WithRetainedArguments
extends Advice.MethodSizeHandler.Default
A method size handler that expects that the original arguments are retained.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.MethodSizeHandler.Default
Advice.MethodSizeHandler.Default.ForAdvice, Advice.MethodSizeHandler.Default.WithCopiedArguments, Advice.MethodSizeHandler.Default.WithRetainedArguments
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.MethodSizeHandler
Advice.MethodSizeHandler.Default, Advice.MethodSizeHandler.ForInstrumentedMethod, Advice.MethodSizeHandler.NoOp
-
Field Summary
Fields inherited from class net.bytebuddy.asm.Advice.MethodSizeHandler.Default
initialTypes, instrumentedMethod, localVariableLength, postMethodTypes, preMethodTypes, stackSize
Fields inherited from interface net.bytebuddy.asm.Advice.MethodSizeHandler
UNDEFINED_SIZE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WithRetainedArguments
(MethodDescription instrumentedMethod, List<? extends TypeDescription> initialTypes, List<? extends TypeDescription> preMethodTypes, List<? extends TypeDescription> postMethodTypes) Creates a new default method size handler that expects that the original arguments are retained. -
Method Summary
Modifier and TypeMethodDescriptionbindExit
(MethodDescription.InDefinedShape adviceMethod) Binds the method size handler for the exit advice.int
compoundLocalVariableLength
(int localVariableLength) Computes a compound local variable array length for the advice and the translated instrumented method.Methods inherited from class net.bytebuddy.asm.Advice.MethodSizeHandler.Default
bindEnter, compoundStackSize, of, requireLocalVariableLength, requireStackSize
-
Constructor Details
-
WithRetainedArguments
protected WithRetainedArguments(MethodDescription instrumentedMethod, List<? extends TypeDescription> initialTypes, List<? extends TypeDescription> preMethodTypes, List<? extends TypeDescription> postMethodTypes) Creates a new default method size handler that expects that the original arguments are retained.- Parameters:
instrumentedMethod
- The instrumented method.initialTypes
- A list of virtual method arguments that are explicitly added before any code execution.preMethodTypes
- A list of virtual method arguments that are available before the instrumented method is executed.postMethodTypes
- A list of virtual method arguments that are available after the instrumented method has completed.
-
-
Method Details
-
bindExit
Binds the method size handler for the exit advice.- Parameters:
adviceMethod
- The method representing the exit advice.- Returns:
- A method size handler for the exit advice.
-
compoundLocalVariableLength
public int compoundLocalVariableLength(int localVariableLength) Computes a compound local variable array length for the advice and the translated instrumented method.- Specified by:
compoundLocalVariableLength
in interfaceAdvice.MethodSizeHandler.ForInstrumentedMethod
- Overrides:
compoundLocalVariableLength
in classAdvice.MethodSizeHandler.Default
- Parameters:
localVariableLength
- The required local variable array length of the instrumented method before translation.- Returns:
- The local variable length required by the instrumented method and its advice methods.
-