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
-
- 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 protected int
getReturnValueOffset()
Resolves the offset of the advice method's local variable.-
Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Inlining.CodeTranslationVisitor
propagateHandler, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitIincInsn, visitInsn, 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
-
getReturnValueOffset
protected int getReturnValueOffset()
Description copied from class:Advice.Dispatcher.Inlining.CodeTranslationVisitor
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.Inlining.CodeTranslationVisitor
- Returns:
- The offset of the represented advice method.
-
-