Package net.bytebuddy.asm
Enum Advice.StackMapFrameHandler.NoOp
- java.lang.Object
-
- java.lang.Enum<Advice.StackMapFrameHandler.NoOp>
-
- net.bytebuddy.asm.Advice.StackMapFrameHandler.NoOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Advice.StackMapFrameHandler.NoOp>
,Advice.StackMapFrameHandler
,Advice.StackMapFrameHandler.ForAdvice
,Advice.StackMapFrameHandler.ForInstrumentedMethod
- Enclosing interface:
- Advice.StackMapFrameHandler
public static enum Advice.StackMapFrameHandler.NoOp extends java.lang.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 interface net.bytebuddy.asm.Advice.StackMapFrameHandler
Advice.StackMapFrameHandler.Default, Advice.StackMapFrameHandler.ForAdvice, Advice.StackMapFrameHandler.ForInstrumentedMethod, Advice.StackMapFrameHandler.NoOp
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
NoOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Advice.StackMapFrameHandler.ForAdvice
bindEnter(MethodDescription.InDefinedShape adviceMethod)
Binds this meta data handler for the enter advice.Advice.StackMapFrameHandler.ForAdvice
bindExit(MethodDescription.InDefinedShape adviceMethod)
Binds this meta data handler for the exit advice.int
getReaderHint()
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
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, java.lang.Object[] localVariable, int stackSize, java.lang.Object[] stack)
Translates a frame.static Advice.StackMapFrameHandler.NoOp
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Advice.StackMapFrameHandler.NoOp[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Advice.StackMapFrameHandler.NoOp INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static Advice.StackMapFrameHandler.NoOp[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Advice.StackMapFrameHandler.NoOp c : Advice.StackMapFrameHandler.NoOp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Advice.StackMapFrameHandler.NoOp valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- 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, java.lang.Object[] localVariable, int stackSize, java.lang.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.
-
-