protected abstract static class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter extends Object implements Advice.Dispatcher.Bound, Advice.Dispatcher.SuppressionHandler.ReturnValueProducer
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter
An advice method writer for a method entry.
|
protected static class |
Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodExit
An advice method writer for a method exit.
|
Modifier and Type | Field and Description |
---|---|
protected MethodDescription.InDefinedShape |
adviceMethod
The advice method.
|
protected MethodDescription.InDefinedShape |
instrumentedMethod
The instrumented method.
|
protected MethodVisitor |
methodVisitor
The method visitor for writing the instrumented method.
|
protected Advice.StackMapFrameHandler.ForAdvice |
stackMapFrameHandler
A handler for translating and injecting stack map frmes.
|
Modifier | Constructor and Description |
---|---|
protected |
AdviceMethodWriter(MethodDescription.InDefinedShape adviceMethod,
MethodDescription.InDefinedShape instrumentedMethod,
List<Advice.Dispatcher.OffsetMapping.Target> offsetMappings,
MethodVisitor methodVisitor,
Advice.MethodSizeHandler.ForAdvice methodSizeHandler,
Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler,
Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler)
Creates a new advice method writer.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Writes the advice method's code.
|
protected abstract void |
onMethodReturn()
Invoked directly after the advice method was called.
|
void |
prepare()
Prepares the advice method's exception handlers.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onDefaultValue
protected final MethodDescription.InDefinedShape adviceMethod
protected final MethodDescription.InDefinedShape instrumentedMethod
protected final MethodVisitor methodVisitor
protected final Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler
protected AdviceMethodWriter(MethodDescription.InDefinedShape adviceMethod, MethodDescription.InDefinedShape instrumentedMethod, List<Advice.Dispatcher.OffsetMapping.Target> offsetMappings, MethodVisitor methodVisitor, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler)
adviceMethod
- The advice method.instrumentedMethod
- The instrumented method.offsetMappings
- The offset mappings available to this advice.methodVisitor
- The method visitor for writing the instrumented method.methodSizeHandler
- A handler for computing the method size requirements.stackMapFrameHandler
- A handler for translating and injecting stack map frames.suppressionHandler
- A bound suppression handler that is used for suppressing exceptions of this advice method.public void prepare()
Advice.Dispatcher.Bound
prepare
in interface Advice.Dispatcher.Bound
public void apply()
Advice.Dispatcher.Bound
apply
in interface Advice.Dispatcher.Bound
protected abstract void onMethodReturn()
Copyright © 2014–2016. All rights reserved.