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.
|
Advice.Dispatcher.Bound.SkipHandler
Modifier and Type | Field and Description |
---|---|
protected MethodDescription.InDefinedShape |
adviceMethod
The advice method.
|
protected Implementation.Context |
implementationContext
The implementation context to use.
|
protected MethodDescription |
instrumentedMethod
The instrumented method.
|
protected Advice.MethodSizeHandler.ForAdvice |
methodSizeHandler
A handler for computing the method size requirements.
|
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 instrumentedMethod,
List<Advice.OffsetMapping.Target> offsetMappings,
MethodVisitor methodVisitor,
Implementation.Context implementationContext,
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 |
---|---|
protected void |
doApply()
Writes the advice method invocation.
|
protected abstract void |
onMethodReturn()
Invoked directly after the advice method was called.
|
void |
prepare()
Prepares the advice method's exception handlers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onDefaultValue
protected final MethodDescription.InDefinedShape adviceMethod
protected final MethodDescription instrumentedMethod
protected final MethodVisitor methodVisitor
protected final Implementation.Context implementationContext
protected final Advice.MethodSizeHandler.ForAdvice methodSizeHandler
protected final Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler
protected AdviceMethodWriter(MethodDescription.InDefinedShape adviceMethod, MethodDescription instrumentedMethod, List<Advice.OffsetMapping.Target> offsetMappings, MethodVisitor methodVisitor, Implementation.Context implementationContext, 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.implementationContext
- The implementation context to use.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
protected void doApply()
protected abstract void onMethodReturn()
Copyright © 2014–2017. All rights reserved.