protected abstract static class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter extends java.lang.Object implements Advice.Dispatcher.Bound
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter
An advice method writer for a method enter.
|
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 Advice.ArgumentHandler.ForAdvice |
argumentHandler
A handler for accessing values on the local variable array.
|
private static int |
EMPTY
Indicates an empty local variable array which is not required for calling a method.
|
protected Implementation.Context |
implementationContext
The implementation context to use.
|
protected Advice.MethodSizeHandler.ForAdvice |
methodSizeHandler
A handler for computing the method size requirements.
|
protected org.objectweb.asm.MethodVisitor |
methodVisitor
The method visitor for writing the instrumented method.
|
private java.util.List<Advice.OffsetMapping.Target> |
offsetMappings
The offset mappings available to this advice.
|
private Advice.Dispatcher.RelocationHandler.Bound |
relocationHandler
A bound relocation handler that is responsible for considering a non-standard control flow.
|
protected Advice.StackMapFrameHandler.ForAdvice |
stackMapFrameHandler
A handler for translating and injecting stack map frames.
|
private Advice.Dispatcher.SuppressionHandler.Bound |
suppressionHandler
A bound suppression handler that is used for suppressing exceptions of this advice method.
|
Modifier | Constructor and Description |
---|---|
protected |
AdviceMethodWriter(MethodDescription.InDefinedShape adviceMethod,
java.util.List<Advice.OffsetMapping.Target> offsetMappings,
org.objectweb.asm.MethodVisitor methodVisitor,
Implementation.Context implementationContext,
Advice.ArgumentHandler.ForAdvice argumentHandler,
Advice.MethodSizeHandler.ForAdvice methodSizeHandler,
Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler,
Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler,
Advice.Dispatcher.RelocationHandler.Bound relocationHandler)
Creates a new advice method writer.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Applies this dispatcher.
|
protected abstract int |
getReturnValueOffset()
Resolves the offset of the advice method's local variable.
|
void |
prepare()
Prepares the advice method's exception handlers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize
private static final int EMPTY
protected final MethodDescription.InDefinedShape adviceMethod
private final java.util.List<Advice.OffsetMapping.Target> offsetMappings
protected final org.objectweb.asm.MethodVisitor methodVisitor
protected final Implementation.Context implementationContext
protected final Advice.ArgumentHandler.ForAdvice argumentHandler
protected final Advice.MethodSizeHandler.ForAdvice methodSizeHandler
protected final Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler
private final Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler
private final Advice.Dispatcher.RelocationHandler.Bound relocationHandler
protected AdviceMethodWriter(MethodDescription.InDefinedShape adviceMethod, java.util.List<Advice.OffsetMapping.Target> offsetMappings, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.ArgumentHandler.ForAdvice argumentHandler, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.RelocationHandler.Bound relocationHandler)
adviceMethod
- The advice method.offsetMappings
- The offset mappings available to this advice.methodVisitor
- The method visitor for writing the instrumented method.implementationContext
- The implementation context to use.argumentHandler
- A handler for accessing values on the local variable array.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.relocationHandler
- A bound relocation handler that is responsible for considering a non-standard control flow.public void prepare()
prepare
in interface Advice.Dispatcher.Bound
public void apply()
apply
in interface Advice.Dispatcher.Bound
protected abstract int getReturnValueOffset()
void
.