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 TypeList |
requiredTypes
A list of intermediate types to be considered as part of the instrumented method's steady signature.
|
protected Advice.StackMapFrameHandler.Default.TranslationMode |
translationMode
The translation mode to apply for this advice method.
|
Modifier | Constructor and Description |
---|---|
protected |
ForAdvice(MethodDescription.InDefinedShape adviceMethod,
TypeList requiredTypes,
TypeList yieldedTypes,
Advice.StackMapFrameHandler.Default.TranslationMode translationMode)
Creates a new meta data handler for an advice method.
|
Modifier and Type | Method and Description |
---|---|
void |
injectCompletionFrame(MethodVisitor methodVisitor,
boolean secondary)
Injects a frame indicating the completion of the currently handled method, i.e. all yielded types were added.
|
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.
|
String |
toString() |
void |
translateFrame(MethodVisitor methodVisitor,
int type,
int localVariableLength,
Object[] localVariable,
int stackSize,
Object[] stack)
Translates a frame.
|
protected final MethodDescription.InDefinedShape adviceMethod
protected final TypeList requiredTypes
protected final Advice.StackMapFrameHandler.Default.TranslationMode translationMode
Advice.StackMapFrameHandler.Default.TranslationMode.ENTRY
or Advice.StackMapFrameHandler.Default.TranslationMode.EXIT
.protected ForAdvice(MethodDescription.InDefinedShape adviceMethod, TypeList requiredTypes, TypeList yieldedTypes, Advice.StackMapFrameHandler.Default.TranslationMode translationMode)
adviceMethod
- The method description for which frames are translated.requiredTypes
- A list of expected types to be considered as part of the instrumented method's steady signature.yieldedTypes
- The types that this method yields as a result.translationMode
- The translation mode to apply for this advice method. Should be
either Advice.StackMapFrameHandler.Default.TranslationMode.ENTRY
or Advice.StackMapFrameHandler.Default.TranslationMode.EXIT
.public void translateFrame(MethodVisitor methodVisitor, int type, int localVariableLength, Object[] localVariable, int stackSize, Object[] stack)
Advice.StackMapFrameHandler
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)
Advice.StackMapFrameHandler
injectReturnFrame
in interface Advice.StackMapFrameHandler
methodVisitor
- The method visitor onto which to apply the stack map frame.public void injectExceptionFrame(MethodVisitor methodVisitor)
Advice.StackMapFrameHandler
injectExceptionFrame
in interface Advice.StackMapFrameHandler
methodVisitor
- The method visitor onto which to apply the stack map frame.public void injectCompletionFrame(MethodVisitor methodVisitor, boolean secondary)
Advice.StackMapFrameHandler
injectCompletionFrame
in interface Advice.StackMapFrameHandler
methodVisitor
- The method visitor onto which to apply the stack map frame.secondary
- true
if another completion frame for this method was written previously.Copyright © 2014–2017. All rights reserved.