Class Advice.MethodSizeHandler.Default.ForAdvice

    • 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 interface Advice.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 interface Advice.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 interface Advice.MethodSizeHandler.ForAdvice
        Parameters:
        stackSize - The minimum required stack size.
        localVariableLength - The minimum required length of the local variable array.