Package net.bytebuddy.asm
Class Advice.MethodSizeHandler.Default.WithCopiedArguments
- java.lang.Object
-
- net.bytebuddy.asm.Advice.MethodSizeHandler.Default
-
- net.bytebuddy.asm.Advice.MethodSizeHandler.Default.WithCopiedArguments
-
- All Implemented Interfaces:
Advice.MethodSizeHandler
,Advice.MethodSizeHandler.ForInstrumentedMethod
- Enclosing class:
- Advice.MethodSizeHandler.Default
protected static class Advice.MethodSizeHandler.Default.WithCopiedArguments extends Advice.MethodSizeHandler.Default
A method size handler that expects that the original arguments were copied.
-
-
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
Constructors Modifier Constructor Description protected
WithCopiedArguments(MethodDescription instrumentedMethod, java.util.List<? extends TypeDescription> initialTypes, java.util.List<? extends TypeDescription> preMethodTypes, java.util.List<? extends TypeDescription> postMethodTypes)
Creates a new default method size handler that expects the original arguments to be copied.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Advice.MethodSizeHandler.ForAdvice
bindExit(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 Detail
-
WithCopiedArguments
protected WithCopiedArguments(MethodDescription instrumentedMethod, java.util.List<? extends TypeDescription> initialTypes, java.util.List<? extends TypeDescription> preMethodTypes, java.util.List<? extends TypeDescription> postMethodTypes)
Creates a new default method size handler that expects the original arguments to be copied.- 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 Detail
-
bindExit
public Advice.MethodSizeHandler.ForAdvice bindExit(MethodDescription.InDefinedShape adviceMethod)
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.
-
-