Package net.bytebuddy.asm
Class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter
- java.lang.Object
-
- net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
-
- net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter
-
- All Implemented Interfaces:
Advice.Dispatcher.Bound
,Advice.Dispatcher.Bound.ForMethodEnter
,Advice.Dispatcher.SuppressionHandler.ReturnValueProducer
- Enclosing class:
- Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
protected static class Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter.ForMethodEnter extends Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter implements Advice.Dispatcher.Bound.ForMethodEnter
An advice method writer for a method entry.
-
-
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
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher.Bound
Advice.Dispatcher.Bound.ForMethodEnter, Advice.Dispatcher.Bound.ForMethodExit, Advice.Dispatcher.Bound.SkipHandler
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
adviceMethod, implementationContext, instrumentedMethod, methodSizeHandler, methodVisitor, stackMapFrameHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodEnter(MethodDescription.InDefinedShape adviceMethod, MethodDescription instrumentedMethod, java.util.List<Advice.OffsetMapping.Target> offsetMappings, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher skipDispatcher)
Creates a new advice method writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Advice.Dispatcher.Bound.SkipHandler skipHandler)
Applies this dispatcher.void
onDefaultValue(org.objectweb.asm.MethodVisitor methodVisitor)
Instructs this return value producer to assure the production of a default value for the return type of the currently handled method.protected void
onMethodReturn()
Invoked directly after the advice method was called.-
Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
doApply, prepare
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.asm.Advice.Dispatcher.Bound
prepare
-
-
-
-
Constructor Detail
-
ForMethodEnter
protected ForMethodEnter(MethodDescription.InDefinedShape adviceMethod, MethodDescription instrumentedMethod, java.util.List<Advice.OffsetMapping.Target> offsetMappings, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.Resolved.ForMethodEnter.SkipDispatcher skipDispatcher)
Creates a new advice method writer.- Parameters:
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.skipDispatcher
- The skip dispatcher to use.
-
-
Method Detail
-
onMethodReturn
protected void onMethodReturn()
Description copied from class:Advice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
Invoked directly after the advice method was called.- Specified by:
onMethodReturn
in classAdvice.Dispatcher.Delegating.Resolved.AdviceMethodWriter
-
apply
public void apply(Advice.Dispatcher.Bound.SkipHandler skipHandler)
Description copied from interface:Advice.Dispatcher.Bound.ForMethodEnter
Applies this dispatcher.- Specified by:
apply
in interfaceAdvice.Dispatcher.Bound.ForMethodEnter
- Parameters:
skipHandler
- The skip handler to use.
-
onDefaultValue
public void onDefaultValue(org.objectweb.asm.MethodVisitor methodVisitor)
Description copied from interface:Advice.Dispatcher.SuppressionHandler.ReturnValueProducer
Instructs this return value producer to assure the production of a default value for the return type of the currently handled method.- Specified by:
onDefaultValue
in interfaceAdvice.Dispatcher.SuppressionHandler.ReturnValueProducer
- Parameters:
methodVisitor
- The method visitor to write the default value to.
-
-