protected static class Advice.ArgumentHandler.Factory.Simple extends Object implements Advice.ArgumentHandler.ForInstrumentedMethod
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethodTHIS_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.ForInstrumentedMethodprepare in interface Advice.ArgumentHandler.ForInstrumentedMethodmethodVisitor - The method visitor to which to write any potential byte code.public int variable(int index)
Advice.ArgumentHandler.ForInstrumentedMethodvariable in interface Advice.ArgumentHandler.ForInstrumentedMethodindex - The index to resolve.public int argument(int offset)
Advice.ArgumentHandlerargument in interface Advice.ArgumentHandleroffset - The offset to resolve.public int enter()
Advice.ArgumentHandlerenter in interface Advice.ArgumentHandlerpublic int returned()
Advice.ArgumentHandlerreturned in interface Advice.ArgumentHandlerpublic int thrown()
Advice.ArgumentHandlerthrown in interface Advice.ArgumentHandlerpublic List<TypeDescription> getIntermediateTypes()
Advice.ArgumentHandler.ForInstrumentedMethodgetIntermediateTypes in interface Advice.ArgumentHandler.ForInstrumentedMethodpublic Advice.ArgumentHandler.ForAdvice bindEnter(MethodDescription adviceMethod)
Advice.ArgumentHandler.ForInstrumentedMethodbindEnter in interface Advice.ArgumentHandler.ForInstrumentedMethodadviceMethod - The resolved enter advice handler.public Advice.ArgumentHandler.ForAdvice bindExit(MethodDescription adviceMethod, boolean skipThrowable)
Advice.ArgumentHandler.ForInstrumentedMethodbindExit in interface Advice.ArgumentHandler.ForInstrumentedMethodadviceMethod - The resolved exit advice handler.skipThrowable - true if no throwable is stored.Copyright © 2014–2018. All rights reserved.