protected class Advice.StackMapFrameHandler.Default.ForAdvice extends Object implements Advice.StackMapFrameHandler.ForAdvice
Advice.StackMapFrameHandler.Default, Advice.StackMapFrameHandler.ForAdvice, Advice.StackMapFrameHandler.ForInstrumentedMethod, Advice.StackMapFrameHandler.NoOp
Modifier and Type | Field and Description |
---|---|
protected MethodDescription.InDefinedShape |
adviceMethod
The method description for which frames are translated.
|
protected List<? extends TypeDescription> |
endTypes
The types provided after execution of the advice code.
|
protected List<? extends TypeDescription> |
startTypes
The types provided before execution of the advice code.
|
protected Advice.StackMapFrameHandler.Default.TranslationMode |
translationMode
The translation mode to apply for this advice method.
|
Modifier | Constructor and Description |
---|---|
protected |
ForAdvice(MethodDescription.InDefinedShape adviceMethod,
List<? extends TypeDescription> startTypes,
List<? extends TypeDescription> endTypes,
Advice.StackMapFrameHandler.Default.TranslationMode translationMode,
Advice.StackMapFrameHandler.Default.Initialization initialization)
Creates a new meta data handler for an advice method.
|
Modifier and Type | Method and Description |
---|---|
void |
injectCompletionFrame(MethodVisitor methodVisitor)
Injects a frame indicating the completion of the currently handled method, i.e.
|
void |
injectExceptionFrame(MethodVisitor methodVisitor)
Injects a frame indicating the beginning of an exception handler for the currently handled method.
|
void |
injectReturnFrame(MethodVisitor methodVisitor)
Injects a frame indicating the beginning of a return value handler for the currently handled method.
|
void |
translateFrame(MethodVisitor methodVisitor,
int type,
int localVariableLength,
Object[] localVariable,
int stackSize,
Object[] stack)
Translates a frame.
|
protected final MethodDescription.InDefinedShape adviceMethod
protected final List<? extends TypeDescription> startTypes
protected final List<? extends TypeDescription> endTypes
protected final Advice.StackMapFrameHandler.Default.TranslationMode translationMode
Advice.StackMapFrameHandler.Default.TranslationMode.ENTER
or Advice.StackMapFrameHandler.Default.TranslationMode.EXIT
.protected ForAdvice(MethodDescription.InDefinedShape adviceMethod, List<? extends TypeDescription> startTypes, List<? extends TypeDescription> endTypes, Advice.StackMapFrameHandler.Default.TranslationMode translationMode, Advice.StackMapFrameHandler.Default.Initialization initialization)
adviceMethod
- The method description for which frames are translated.startTypes
- The types provided before execution of the advice code.endTypes
- The types provided after execution of the advice code.translationMode
- The translation mode to apply for this advice method. Should be
either Advice.StackMapFrameHandler.Default.TranslationMode.ENTER
or Advice.StackMapFrameHandler.Default.TranslationMode.EXIT
.initialization
- The initialization to apply when resolving a reference to the instance on which a non-static method is invoked.public void translateFrame(MethodVisitor methodVisitor, int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack)
translateFrame
in interface Advice.StackMapFrameHandler
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.public void injectReturnFrame(MethodVisitor methodVisitor)
injectReturnFrame
in interface Advice.StackMapFrameHandler
methodVisitor
- The method visitor onto which to apply the stack map frame.public void injectExceptionFrame(MethodVisitor methodVisitor)
injectExceptionFrame
in interface Advice.StackMapFrameHandler
methodVisitor
- The method visitor onto which to apply the stack map frame.public void injectCompletionFrame(MethodVisitor methodVisitor)
injectCompletionFrame
in interface Advice.StackMapFrameHandler
methodVisitor
- The method visitor onto which to apply the stack map frame.Copyright © 2014–2020. All rights reserved.