Package net.bytebuddy.asm
Class Advice.MethodSizeHandler.Default.ForAdvice
- java.lang.Object
-
- net.bytebuddy.asm.Advice.MethodSizeHandler.Default.ForAdvice
-
- All Implemented Interfaces:
Advice.MethodSizeHandler
,Advice.MethodSizeHandler.ForAdvice
- Enclosing class:
- Advice.MethodSizeHandler.Default
protected class Advice.MethodSizeHandler.Default.ForAdvice extends java.lang.Object implements Advice.MethodSizeHandler.ForAdvice
A method size handler for an advice method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.MethodSizeHandler
Advice.MethodSizeHandler.Default, Advice.MethodSizeHandler.ForAdvice, Advice.MethodSizeHandler.ForInstrumentedMethod, Advice.MethodSizeHandler.NoOp
-
-
Field Summary
-
Fields inherited from interface net.bytebuddy.asm.Advice.MethodSizeHandler
UNDEFINED_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForAdvice(MethodDescription.InDefinedShape adviceMethod, java.util.List<? extends TypeDescription> startTypes, java.util.List<? extends TypeDescription> endTypes)
Creates a new method size handler for an advice method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
recordMaxima(int stackSize, int localVariableLength)
Records the maximum values for stack size and local variable array which are required by the advice method for its individual execution without translation.void
recordPadding(int padding)
Records a minimum padding additionally to the computed stack size that is required for implementing this advice method.void
requireLocalVariableLength(int localVariableLength)
Requires a minimum length of the local variable array.void
requireStackSize(int stackSize)
Records a minimum stack size required by the represented advice method.
-
-
-
Constructor Detail
-
ForAdvice
protected ForAdvice(MethodDescription.InDefinedShape adviceMethod, java.util.List<? extends TypeDescription> startTypes, java.util.List<? extends TypeDescription> endTypes)
Creates a new method size handler for an advice method.- Parameters:
adviceMethod
- The advice method.startTypes
- The types provided before execution of the advice code.endTypes
- The types provided after execution of the advice code.
-
-
Method Detail
-
requireLocalVariableLength
public void requireLocalVariableLength(int localVariableLength)
Description copied from interface:Advice.MethodSizeHandler
Requires a minimum length of the local variable array.- Specified by:
requireLocalVariableLength
in interfaceAdvice.MethodSizeHandler
- Parameters:
localVariableLength
- The minimal required length of the local variable array.
-
requireStackSize
public void requireStackSize(int stackSize)
Description copied from interface:Advice.MethodSizeHandler
Records a minimum stack size required by the represented advice method.- Specified by:
requireStackSize
in interfaceAdvice.MethodSizeHandler
- Parameters:
stackSize
- The minimum size required by the represented advice method.
-
recordMaxima
public void recordMaxima(int stackSize, int localVariableLength)
Description copied from interface:Advice.MethodSizeHandler.ForAdvice
Records the maximum values for stack size and local variable array which are required by the advice method for its individual execution without translation.- Specified by:
recordMaxima
in interfaceAdvice.MethodSizeHandler.ForAdvice
- Parameters:
stackSize
- The minimum required stack size.localVariableLength
- The minimum required length of the local variable array.
-
recordPadding
public void recordPadding(int padding)
Description copied from interface:Advice.MethodSizeHandler.ForAdvice
Records a minimum padding additionally to the computed stack size that is required for implementing this advice method.- Specified by:
recordPadding
in interfaceAdvice.MethodSizeHandler.ForAdvice
- Parameters:
padding
- The minimum required padding.
-
-