protected static class Advice.ArgumentHandler.Factory.Simple extends Object implements Advice.ArgumentHandler.ForInstrumentedMethod
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethod
THIS_REFERENCE
Modifier | Constructor and Description |
---|---|
protected |
Simple(MethodDescription instrumentedMethod,
TypeDefinition enterType)
Creates a new simple argument handler for an instrumented method.
|
Modifier and Type | Method and Description |
---|---|
int |
argument(int offset)
Resolves an offset relative to an offset of the instrumented method.
|
Advice.ArgumentHandler.ForAdvice |
bindEnter(MethodDescription adviceMethod)
Binds an advice method as enter advice for this handler.
|
Advice.ArgumentHandler.ForAdvice |
bindExit(MethodDescription adviceMethod,
boolean skipThrowable)
Binds an advice method as exit advice for this handler.
|
int |
enter()
Resolves the offset of the enter value of the enter advice.
|
List<TypeDescription> |
getIntermediateTypes()
A list of intermediate types that are stored in the local variable array after a potential enter advice was executed.
|
int |
prepare(MethodVisitor methodVisitor)
Prepates this argument handler for future offset access.
|
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.
|
int |
variable(int index)
Resolves a local variable index.
|
protected Simple(MethodDescription instrumentedMethod, TypeDefinition enterType)
instrumentedMethod
- The instrumented method.enterType
- The enter type or void
if no enter type is defined.public int prepare(MethodVisitor methodVisitor)
Advice.ArgumentHandler.ForInstrumentedMethod
prepare
in interface Advice.ArgumentHandler.ForInstrumentedMethod
methodVisitor
- The method visitor to which to write any potential byte code.public int variable(int index)
Advice.ArgumentHandler.ForInstrumentedMethod
variable
in interface Advice.ArgumentHandler.ForInstrumentedMethod
index
- The index to resolve.public int argument(int offset)
Advice.ArgumentHandler
argument
in interface Advice.ArgumentHandler
offset
- The offset to resolve.public int enter()
Advice.ArgumentHandler
enter
in interface Advice.ArgumentHandler
public int returned()
Advice.ArgumentHandler
returned
in interface Advice.ArgumentHandler
public int thrown()
Advice.ArgumentHandler
thrown
in interface Advice.ArgumentHandler
public List<TypeDescription> getIntermediateTypes()
Advice.ArgumentHandler.ForInstrumentedMethod
getIntermediateTypes
in interface Advice.ArgumentHandler.ForInstrumentedMethod
public Advice.ArgumentHandler.ForAdvice bindEnter(MethodDescription adviceMethod)
Advice.ArgumentHandler.ForInstrumentedMethod
bindEnter
in interface Advice.ArgumentHandler.ForInstrumentedMethod
adviceMethod
- The resolved enter advice handler.public Advice.ArgumentHandler.ForAdvice bindExit(MethodDescription adviceMethod, boolean skipThrowable)
Advice.ArgumentHandler.ForInstrumentedMethod
bindExit
in interface Advice.ArgumentHandler.ForInstrumentedMethod
adviceMethod
- The resolved exit advice handler.skipThrowable
- true
if no throwable is stored.Copyright © 2014–2018. All rights reserved.