Package net.bytebuddy.asm
Class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodExit
- java.lang.Object
-
- net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
-
- net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodExit
-
- All Implemented Interfaces:
Advice.Dispatcher.Bound
- Enclosing class:
- Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
protected static class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodExit extends Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
An advice method writer for a method exit.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter, Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodExit
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
adviceMethod, argumentHandler, implementationContext, methodSizeHandler, methodVisitor, stackMapFrameHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodExit(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getReturnValueOffset()
Resolves the offset of the advice method's local variable.void
initialize()
Initialized the advice's methods local variables.-
Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
apply, prepare
-
-
-
-
Constructor Detail
-
ForMethodExit
protected ForMethodExit(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.- Parameters:
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.
-
-
Method Detail
-
initialize
public void initialize()
Initialized the advice's methods local variables.
-
getReturnValueOffset
protected int getReturnValueOffset()
Description copied from class:Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
Resolves the offset of the advice method's local variable. The returned value is only valid if this advice method does not returnvoid
.- Specified by:
getReturnValueOffset
in classAdvice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
- Returns:
- The offset of the represented advice method.
-
-