Package net.bytebuddy.asm
Class Advice.Dispatcher.Inlining.CodeTranslationVisitor.ForMethodEnter
- java.lang.Object
-
- org.objectweb.asm.MethodVisitor
-
- net.bytebuddy.asm.Advice.Dispatcher.Inlining.CodeTranslationVisitor
-
- net.bytebuddy.asm.Advice.Dispatcher.Inlining.CodeTranslationVisitor.ForMethodEnter
-
- All Implemented Interfaces:
Advice.Dispatcher.SuppressionHandler.ReturnValueProducer
- Enclosing class:
- Advice.Dispatcher.Inlining.CodeTranslationVisitor
protected static class Advice.Dispatcher.Inlining.CodeTranslationVisitor.ForMethodEnter extends Advice.Dispatcher.Inlining.CodeTranslationVisitor
A code translation visitor that retains the return value of the represented advice method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.CodeTranslationVisitor
Advice.Dispatcher.Inlining.CodeTranslationVisitor.ForMethodEnter, Advice.Dispatcher.Inlining.CodeTranslationVisitor.ForMethodExit
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.CodeTranslationVisitor
adviceMethod, argumentHandler, endOfMethod, implementationContext, methodSizeHandler, methodVisitor, stackMapFrameHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodEnter(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.ArgumentHandler.ForAdvice argumentHandler, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, MethodDescription instrumentedMethod, MethodDescription.InDefinedShape adviceMethod, java.util.Map<java.lang.Integer,Advice.OffsetMapping.Target> offsetMappings, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.RelocationHandler.Bound relocationHandler)
Creates a code translation visitor for translating exit advice.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 after returning from the advice method.void
visitInsn(int opcode)
-
Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.CodeTranslationVisitor
propagateHandler, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitIincInsn, visitMaxs, visitParameter, visitParameterAnnotation, visitTypeAnnotation, visitVarInsn
-
Methods inherited from class org.objectweb.asm.MethodVisitor
visitFieldInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeInsn
-
-
-
-
Constructor Detail
-
ForMethodEnter
protected ForMethodEnter(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Advice.ArgumentHandler.ForAdvice argumentHandler, Advice.MethodSizeHandler.ForAdvice methodSizeHandler, Advice.StackMapFrameHandler.ForAdvice stackMapFrameHandler, MethodDescription instrumentedMethod, MethodDescription.InDefinedShape adviceMethod, java.util.Map<java.lang.Integer,Advice.OffsetMapping.Target> offsetMappings, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.RelocationHandler.Bound relocationHandler)
Creates a code translation visitor for translating exit advice.- Parameters:
methodVisitor
- A method visitor for writing the instrumented method's byte code.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.instrumentedMethod
- The instrumented method.adviceMethod
- The advice method.offsetMappings
- A mapping of offsets to resolved target offsets in the instrumented method.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
-
visitInsn
public void visitInsn(int opcode)
- Specified by:
visitInsn
in classAdvice.Dispatcher.Inlining.CodeTranslationVisitor
-
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.- Parameters:
methodVisitor
- The method visitor to write the default value to.
-
onMethodReturn
protected void onMethodReturn()
Description copied from class:Advice.Dispatcher.Inlining.CodeTranslationVisitor
Invoked after returning from the advice method.- Specified by:
onMethodReturn
in classAdvice.Dispatcher.Inlining.CodeTranslationVisitor
-
-