Package net.bytebuddy.asm
Class Advice.ArgumentHandler.ForAdvice.Default.ForMethodExit
java.lang.Object
net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice.Default
net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice.Default.ForMethodExit
- All Implemented Interfaces:
Advice.ArgumentHandler
,Advice.ArgumentHandler.ForAdvice
- Enclosing class:
Advice.ArgumentHandler.ForAdvice.Default
@Enhance
protected static class Advice.ArgumentHandler.ForAdvice.Default.ForMethodExit
extends Advice.ArgumentHandler.ForAdvice.Default
An argument handler for an exit advice method.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice.Default
Advice.ArgumentHandler.ForAdvice.Default.ForMethodEnter, Advice.ArgumentHandler.ForAdvice.Default.ForMethodExit
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethod
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice
Advice.ArgumentHandler.ForAdvice.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeDefinition
The enter type orvoid
if no enter type is defined.private final StackSize
The stack size of a possibly stored throwable.Fields inherited from class net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice.Default
exitType, instrumentedMethod, namedTypes, typeToken
Fields inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
THIS_REFERENCE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForMethodExit
(MethodDescription instrumentedMethod, MethodDescription.TypeToken typeToken, TypeDefinition exitType, SortedMap<String, TypeDefinition> namedTypes, TypeDefinition enterType, StackSize throwableSize) Creates a new argument handler for an exit advice method. -
Method Summary
Methods inherited from class net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice.Default
argument, enter, exit, named
-
Field Details
-
enterType
The enter type orvoid
if no enter type is defined. -
throwableSize
The stack size of a possibly stored throwable.
-
-
Constructor Details
-
ForMethodExit
protected ForMethodExit(MethodDescription instrumentedMethod, MethodDescription.TypeToken typeToken, TypeDefinition exitType, SortedMap<String, TypeDefinition> namedTypes, TypeDefinition enterType, StackSize throwableSize) Creates a new argument handler for an exit advice method.- Parameters:
instrumentedMethod
- The instrumented method.typeToken
- The type token of the advice method.exitType
- The exit type orvoid
if no exit type is defined.namedTypes
- A mapping of all available local variables by their name to their type.enterType
- The enter type orvoid
if no enter type is defined.throwableSize
- The stack size of a possibly stored throwable.
-
-
Method Details
-
returned
public int returned()Resolves the offset of the returned value of the instrumented method.- Returns:
- The offset of the returned value of the instrumented method.
-
thrown
public int thrown()Resolves the offset of the thrown exception of the instrumented method.- Returns:
- The offset of the thrown exception of the instrumented method.
-
mapped
public int mapped(int offset) Resolves an offset of the advice method.- Parameters:
offset
- The offset to resolve.- Returns:
- The resolved offset.
-