Package net.bytebuddy.asm
Class Advice.ArgumentHandler.ForAdvice.ForMethodExit
- java.lang.Object
-
- net.bytebuddy.asm.Advice.ArgumentHandler.ForAdvice.ForMethodExit
-
- All Implemented Interfaces:
Advice.ArgumentHandler
,Advice.ArgumentHandler.ForAdvice
- Enclosing interface:
- Advice.ArgumentHandler.ForAdvice
public static class Advice.ArgumentHandler.ForAdvice.ForMethodExit extends java.lang.Object implements Advice.ArgumentHandler.ForAdvice
An argument handler for an exit advice method.
-
-
Nested Class Summary
-
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.ForMethodEnter, Advice.ArgumentHandler.ForAdvice.ForMethodExit
-
-
Field Summary
Fields Modifier and Type Field Description protected MethodDescription
adviceMethod
The advice method.protected TypeDefinition
enterType
The enter type orvoid
if no enter type is defined.protected MethodDescription
instrumentedMethod
The instrumented method.protected StackSize
throwableSize
The stack size of a possibly stored throwable.-
Fields inherited from interface net.bytebuddy.asm.Advice.ArgumentHandler
THIS_REFERENCE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodExit(MethodDescription instrumentedMethod, MethodDescription adviceMethod, TypeDefinition enterType, StackSize throwableSize)
Creates a new argument handler for an exit advice.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
argument(int offset)
Resolves an offset relative to an offset of the instrumented method.int
enter()
Resolves the offset of the enter value of the enter advice.int
mapped(int offset)
Resolves an offset of the advice method.int
returned()
Resolves the offset of the returned value of the instrumented method.int
thrown()
Resolves the offset of the thrown exception of the instrumented method.
-
-
-
Field Detail
-
instrumentedMethod
protected final MethodDescription instrumentedMethod
The instrumented method.
-
adviceMethod
protected final MethodDescription adviceMethod
The advice method.
-
enterType
protected final TypeDefinition enterType
The enter type orvoid
if no enter type is defined.
-
throwableSize
protected final StackSize throwableSize
The stack size of a possibly stored throwable.
-
-
Constructor Detail
-
ForMethodExit
protected ForMethodExit(MethodDescription instrumentedMethod, MethodDescription adviceMethod, TypeDefinition enterType, StackSize throwableSize)
Creates a new argument handler for an exit advice.- Parameters:
instrumentedMethod
- The instrumented method.adviceMethod
- The advice method.enterType
- The enter type orvoid
if no enter type is defined.throwableSize
- The stack size of a possibly stored throwable.
-
-
Method Detail
-
argument
public int argument(int offset)
Description copied from interface:Advice.ArgumentHandler
Resolves an offset relative to an offset of the instrumented method.- Specified by:
argument
in interfaceAdvice.ArgumentHandler
- Parameters:
offset
- The offset to resolve.- Returns:
- The resolved offset.
-
enter
public int enter()
Description copied from interface:Advice.ArgumentHandler
Resolves the offset of the enter value of the enter advice.- Specified by:
enter
in interfaceAdvice.ArgumentHandler
- Returns:
- The offset of the enter value.
-
returned
public int returned()
Description copied from interface:Advice.ArgumentHandler
Resolves the offset of the returned value of the instrumented method.- Specified by:
returned
in interfaceAdvice.ArgumentHandler
- Returns:
- The offset of the returned value of the instrumented method.
-
thrown
public int thrown()
Description copied from interface:Advice.ArgumentHandler
Resolves the offset of the thrown exception of the instrumented method.- Specified by:
thrown
in interfaceAdvice.ArgumentHandler
- Returns:
- The offset of the thrown exception of the instrumented method.
-
mapped
public int mapped(int offset)
Description copied from interface:Advice.ArgumentHandler.ForAdvice
Resolves an offset of the advice method.- Specified by:
mapped
in interfaceAdvice.ArgumentHandler.ForAdvice
- Parameters:
offset
- The offset to resolve.- Returns:
- The resolved offset.
-
-