Package net.bytebuddy.asm
Enum Class Advice.StackMapFrameHandler.NoOp
- All Implemented Interfaces:
Serializable
,Comparable<Advice.StackMapFrameHandler.NoOp>
,Constable
,Advice.StackMapFrameHandler
,Advice.StackMapFrameHandler.ForAdvice
,Advice.StackMapFrameHandler.ForInstrumentedMethod
,Advice.StackMapFrameHandler.ForPostProcessor
- Enclosing interface:
Advice.StackMapFrameHandler
public static enum Advice.StackMapFrameHandler.NoOp
extends Enum<Advice.StackMapFrameHandler.NoOp>
implements Advice.StackMapFrameHandler.ForInstrumentedMethod, Advice.StackMapFrameHandler.ForAdvice
A non-operational stack map frame 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.StackMapFrameHandler
Advice.StackMapFrameHandler.Default, Advice.StackMapFrameHandler.ForAdvice, Advice.StackMapFrameHandler.ForInstrumentedMethod, Advice.StackMapFrameHandler.ForPostProcessor, Advice.StackMapFrameHandler.NoOp
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbindEnter
(MethodDescription.InDefinedShape adviceMethod) Binds this meta data handler for the enter advice.bindExit
(MethodDescription.InDefinedShape adviceMethod) Binds this meta data handler for the exit advice.int
Returns a hint to supply to aClassReader
when parsing an advice method.void
injectCompletionFrame
(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the completion of the currently handled method, i.e.void
injectExceptionFrame
(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the beginning of an exception handler for the currently handled method.void
injectInitializationFrame
(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame after initialization if any initialization is performed.void
injectIntermediateFrame
(org.objectweb.asm.MethodVisitor methodVisitor, List<? extends TypeDescription> stack) Injects a frame that represents the current state.void
injectPostCompletionFrame
(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the completion of the currently handled method, i.e.void
injectReturnFrame
(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the beginning of a return value handler for the currently handled method.void
injectStartFrame
(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame before executing the instrumented method.void
translateFrame
(org.objectweb.asm.MethodVisitor methodVisitor, int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack) Translates a frame.Returns the enum constant of this class with the specified name.static Advice.StackMapFrameHandler.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
public Advice.StackMapFrameHandler.ForAdvice bindEnter(MethodDescription.InDefinedShape adviceMethod) Binds this meta data handler for the enter advice.- Specified by:
bindEnter
in interfaceAdvice.StackMapFrameHandler.ForInstrumentedMethod
- Parameters:
adviceMethod
- The enter advice method.- Returns:
- An appropriate meta data handler for the enter method.
-
bindExit
public Advice.StackMapFrameHandler.ForAdvice bindExit(MethodDescription.InDefinedShape adviceMethod) Binds this meta data handler for the exit advice.- Specified by:
bindExit
in interfaceAdvice.StackMapFrameHandler.ForInstrumentedMethod
- Parameters:
adviceMethod
- The exit advice method.- Returns:
- An appropriate meta data handler for the enter method.
-
getReaderHint
public int getReaderHint()Returns a hint to supply to aClassReader
when parsing an advice method.- Specified by:
getReaderHint
in interfaceAdvice.StackMapFrameHandler.ForInstrumentedMethod
- Returns:
- The reader hint to supply to an ASM class reader.
-
translateFrame
public void translateFrame(org.objectweb.asm.MethodVisitor methodVisitor, int type, int localVariableLength, @MaybeNull Object[] localVariable, int stackSize, @MaybeNull Object[] stack) Translates a frame.- Specified by:
translateFrame
in interfaceAdvice.StackMapFrameHandler
- Parameters:
methodVisitor
- The method visitor to write the frame to.type
- The frame's type.localVariableLength
- The local variable length.localVariable
- An array containing the types of the current local variables.stackSize
- The size of the operand stack.stack
- An array containing the types of the current operand stack.
-
injectReturnFrame
public void injectReturnFrame(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the beginning of a return value handler for the currently handled method.- Specified by:
injectReturnFrame
in interfaceAdvice.StackMapFrameHandler
- Parameters:
methodVisitor
- The method visitor onto which to apply the stack map frame.
-
injectExceptionFrame
public void injectExceptionFrame(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the beginning of an exception handler for the currently handled method.- Specified by:
injectExceptionFrame
in interfaceAdvice.StackMapFrameHandler
- Parameters:
methodVisitor
- The method visitor onto which to apply the stack map frame.
-
injectCompletionFrame
public void injectCompletionFrame(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the completion of the currently handled method, i.e. all yielded types were added.- Specified by:
injectCompletionFrame
in interfaceAdvice.StackMapFrameHandler
- Parameters:
methodVisitor
- The method visitor onto which to apply the stack map frame.
-
injectInitializationFrame
public void injectInitializationFrame(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame after initialization if any initialization is performed.- Specified by:
injectInitializationFrame
in interfaceAdvice.StackMapFrameHandler.ForInstrumentedMethod
- Parameters:
methodVisitor
- The method visitor to write any frames to.
-
injectStartFrame
public void injectStartFrame(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame before executing the instrumented method.- Specified by:
injectStartFrame
in interfaceAdvice.StackMapFrameHandler.ForInstrumentedMethod
- Parameters:
methodVisitor
- The method visitor to write any frames to.
-
injectPostCompletionFrame
public void injectPostCompletionFrame(org.objectweb.asm.MethodVisitor methodVisitor) Injects a frame indicating the completion of the currently handled method, i.e. all yielded types were added.- Specified by:
injectPostCompletionFrame
in interfaceAdvice.StackMapFrameHandler.ForInstrumentedMethod
- Parameters:
methodVisitor
- The method visitor onto which to apply the stack map frame.
-
injectIntermediateFrame
public void injectIntermediateFrame(org.objectweb.asm.MethodVisitor methodVisitor, List<? extends TypeDescription> stack) Injects a frame that represents the current state.- Specified by:
injectIntermediateFrame
in interfaceAdvice.StackMapFrameHandler.ForPostProcessor
- Parameters:
methodVisitor
- The method visitor onto which to apply the stack map frame.stack
- A list of types that are currently on the stack.
-