Package net.bytebuddy.asm
Enum Class Advice.MethodSizeHandler.NoOp
- All Implemented Interfaces:
Serializable
,Comparable<Advice.MethodSizeHandler.NoOp>
,Constable
,Advice.MethodSizeHandler
,Advice.MethodSizeHandler.ForAdvice
,Advice.MethodSizeHandler.ForInstrumentedMethod
- Enclosing interface:
- Advice.MethodSizeHandler
public static enum Advice.MethodSizeHandler.NoOp
extends Enum<Advice.MethodSizeHandler.NoOp>
implements Advice.MethodSizeHandler.ForInstrumentedMethod, Advice.MethodSizeHandler.ForAdvice
A non-operational method size handler.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.MethodSizeHandler
Advice.MethodSizeHandler.Default, Advice.MethodSizeHandler.ForAdvice, Advice.MethodSizeHandler.ForInstrumentedMethod, Advice.MethodSizeHandler.NoOp
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface net.bytebuddy.asm.Advice.MethodSizeHandler
UNDEFINED_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbindEnter
(MethodDescription.InDefinedShape adviceMethod) Binds a method size handler for the enter advice.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.int
compoundStackSize
(int stackSize) Computes a compound stack size for the advice and the translated instrumented method.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
requireLocalVariableLength
(int localVariableLength) Requires a minimum length of the local variable array.void
requireLocalVariableLengthPadding
(int localVariableLengthPadding) Requires additional padding for the local variable array that is required for this advice's execution.void
requireStackSize
(int stackSize) Records a minimum stack size required by the represented advice method.void
requireStackSizePadding
(int stackSizePadding) Requires additional padding for the operand stack that is required for this advice's execution.Returns the enum constant of this class with the specified name.static Advice.MethodSizeHandler.NoOp[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
NoOp
private NoOp()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
bindEnter
Binds a method size handler for the enter advice.- Specified by:
bindEnter
in interfaceAdvice.MethodSizeHandler.ForInstrumentedMethod
- Parameters:
adviceMethod
- The method representing the enter advice.- Returns:
- A method size handler for the enter advice.
-
bindExit
Binds the method size handler for the exit advice.- Specified by:
bindExit
in interfaceAdvice.MethodSizeHandler.ForInstrumentedMethod
- Parameters:
adviceMethod
- The method representing the exit advice.- Returns:
- A method size handler for the exit advice.
-
compoundStackSize
public int compoundStackSize(int stackSize) Computes a compound stack size for the advice and the translated instrumented method.- Specified by:
compoundStackSize
in interfaceAdvice.MethodSizeHandler.ForInstrumentedMethod
- Parameters:
stackSize
- The required stack size of the instrumented method before translation.- Returns:
- The stack size required by the instrumented method and its advice methods.
-
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
- 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.
-
requireStackSize
public void requireStackSize(int stackSize) 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.
-
requireLocalVariableLength
public void requireLocalVariableLength(int localVariableLength) 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.
-
requireStackSizePadding
public void requireStackSizePadding(int stackSizePadding) Requires additional padding for the operand stack that is required for this advice's execution.- Specified by:
requireStackSizePadding
in interfaceAdvice.MethodSizeHandler.ForAdvice
- Parameters:
stackSizePadding
- The required padding.
-
requireLocalVariableLengthPadding
public void requireLocalVariableLengthPadding(int localVariableLengthPadding) Requires additional padding for the local variable array that is required for this advice's execution.- Specified by:
requireLocalVariableLengthPadding
in interfaceAdvice.MethodSizeHandler.ForAdvice
- Parameters:
localVariableLengthPadding
- The required padding.
-
recordMaxima
public 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.- Specified by:
recordMaxima
in interfaceAdvice.MethodSizeHandler.ForAdvice
- Parameters:
stackSize
- The minimum required stack size.localVariableLength
- The minimum required length of the local variable array.
-