Package net.bytebuddy.asm
Interface Advice.ArgumentHandler
-
- All Known Subinterfaces:
Advice.ArgumentHandler.ForAdvice,Advice.ArgumentHandler.ForInstrumentedMethod
- All Known Implementing Classes:
Advice.ArgumentHandler.ForAdvice.Default,Advice.ArgumentHandler.ForAdvice.Default.ForMethodEnter,Advice.ArgumentHandler.ForAdvice.Default.ForMethodExit,Advice.ArgumentHandler.ForInstrumentedMethod.Default,Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying,Advice.ArgumentHandler.ForInstrumentedMethod.Default.Simple
- Enclosing class:
- Advice
public static interface Advice.ArgumentHandlerAn argument handler is responsible for resolving offsets of the local variable array in the context of the applied instrumentation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAdvice.ArgumentHandler.FactoryA factory for creating an argument handler.static interfaceAdvice.ArgumentHandler.ForAdviceAn argument handler that is used for resolving an advice method.static interfaceAdvice.ArgumentHandler.ForInstrumentedMethodAn argument handler that is used for resolving the instrumented method.
-
Field Summary
Fields Modifier and Type Field Description static intTHIS_REFERENCEThe offset of thethisreference.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intargument(int offset)Resolves an offset relative to an offset of the instrumented method.intenter()Resolves the offset of the enter value of the enter advice.intexit()Resolves the offset of the exit value of the exit advice.intnamed(java.lang.String name)Returns the offset of the local variable with the given name.intreturned()Resolves the offset of the returned value of the instrumented method.intthrown()Resolves the offset of the thrown exception of the instrumented method.
-
-
-
Field Detail
-
THIS_REFERENCE
static final int THIS_REFERENCE
The offset of thethisreference.- See Also:
- Constant Field Values
-
-
Method Detail
-
argument
int argument(int offset)
Resolves an offset relative to an offset of the instrumented method.- Parameters:
offset- The offset to resolve.- Returns:
- The resolved offset.
-
exit
int exit()
Resolves the offset of the exit value of the exit advice.- Returns:
- The offset of the exit value.
-
enter
int enter()
Resolves the offset of the enter value of the enter advice.- Returns:
- The offset of the enter value.
-
named
int named(java.lang.String name)
Returns the offset of the local variable with the given name.- Parameters:
name- The name of the local variable being accessed.- Returns:
- The named variable's offset.
-
returned
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
int thrown()
Resolves the offset of the thrown exception of the instrumented method.- Returns:
- The offset of the thrown exception of the instrumented method.
-
-