Package net.bytebuddy.asm
Class Advice.StackMapFrameHandler.Default.Trivial
- java.lang.Object
-
- net.bytebuddy.asm.Advice.StackMapFrameHandler.Default
-
- net.bytebuddy.asm.Advice.StackMapFrameHandler.Default.Trivial
-
- All Implemented Interfaces:
Advice.StackMapFrameHandler
,Advice.StackMapFrameHandler.ForInstrumentedMethod
- Enclosing class:
- Advice.StackMapFrameHandler.Default
protected static class Advice.StackMapFrameHandler.Default.Trivial extends Advice.StackMapFrameHandler.Default
A trivial stack map frame handler that applies a trivial translation for the instrumented method's stack map frames.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.StackMapFrameHandler.Default
Advice.StackMapFrameHandler.Default.ForAdvice, Advice.StackMapFrameHandler.Default.Initialization, Advice.StackMapFrameHandler.Default.TranslationMode, Advice.StackMapFrameHandler.Default.Trivial, Advice.StackMapFrameHandler.Default.WithPreservedArguments
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.StackMapFrameHandler
Advice.StackMapFrameHandler.Default, Advice.StackMapFrameHandler.ForInstrumentedMethod, Advice.StackMapFrameHandler.NoOp
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.asm.Advice.StackMapFrameHandler.Default
currentFrameDivergence, EMPTY, expandFrames, initialTypes, instrumentedMethod, instrumentedType, postMethodTypes, preMethodTypes
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Trivial(TypeDescription instrumentedType, MethodDescription instrumentedMethod, boolean expandFrames)
Creates a new stack map frame handler that applies a trivial translation for the instrumented method's stack map frames.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Advice.StackMapFrameHandler.ForAdvice
bindExit(MethodDescription.InDefinedShape adviceMethod)
Binds this meta data handler for the exit advice.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.-
Methods inherited from class net.bytebuddy.asm.Advice.StackMapFrameHandler.Default
bindEnter, getReaderHint, injectFullFrame, of, translateFrame
-
-
-
-
Constructor Detail
-
Trivial
protected Trivial(TypeDescription instrumentedType, MethodDescription instrumentedMethod, boolean expandFrames)
Creates a new stack map frame handler that applies a trivial translation for the instrumented method's stack map frames.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.expandFrames
-true
if the meta data handler is expected to expand its frames.
-
-
Method Detail
-
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.- 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.
-
bindExit
public Advice.StackMapFrameHandler.ForAdvice bindExit(MethodDescription.InDefinedShape adviceMethod)
Binds this meta data handler for the exit advice.- Parameters:
adviceMethod
- The exit advice method.- Returns:
- An appropriate meta data handler for the enter method.
-
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.- 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.- 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.- Parameters:
methodVisitor
- The method visitor onto which to apply the stack map frame.
-
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.- 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.- 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.- Parameters:
methodVisitor
- The method visitor to write any frames to.
-
-