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 protectedForAdvice(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 voidrecordMaxima(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.voidrecordPadding(int padding)Records a minimum padding additionally to the computed stack size that is required for implementing this advice method.voidrequireLocalVariableLength(int localVariableLength)Requires a minimum length of the local variable array.voidrequireStackSize(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.MethodSizeHandlerRequires a minimum length of the local variable array.- Specified by:
requireLocalVariableLengthin interfaceAdvice.MethodSizeHandler- Parameters:
localVariableLength- The minimal required length of the local variable array.
-
requireStackSize
public void requireStackSize(int stackSize)
Description copied from interface:Advice.MethodSizeHandlerRecords a minimum stack size required by the represented advice method.- Specified by:
requireStackSizein 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.ForAdviceRecords 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:
recordMaximain 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.ForAdviceRecords a minimum padding additionally to the computed stack size that is required for implementing this advice method.- Specified by:
recordPaddingin interfaceAdvice.MethodSizeHandler.ForAdvice- Parameters:
padding- The minimum required padding.
-
-