public abstract static class Advice.ArgumentHandler.ForInstrumentedMethod.Default extends Object implements Advice.ArgumentHandler.ForInstrumentedMethod
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.ArgumentHandler.ForInstrumentedMethod.Default.Copying
An argument handler for an instrumented method that copies all arguments before executing the instrumented method.
|
protected static class |
Advice.ArgumentHandler.ForInstrumentedMethod.Default.Simple
A simple argument handler for an instrumented method.
|
Advice.ArgumentHandler.ForInstrumentedMethod.Default
Advice.ArgumentHandler.Factory, Advice.ArgumentHandler.ForAdvice, Advice.ArgumentHandler.ForInstrumentedMethod
Modifier and Type | Field and Description |
---|---|
protected TypeDefinition |
enterType
The enter type or
void if no enter type is defined. |
protected TypeDefinition |
exitType
The exit type or
void if no exit type is defined. |
protected MethodDescription |
instrumentedMethod
The instrumented method.
|
protected TreeMap<String,TypeDefinition> |
namedTypes
A mapping of all available local variables by their name to their type.
|
THIS_REFERENCE
Modifier | Constructor and Description |
---|---|
protected |
Default(MethodDescription instrumentedMethod,
TypeDefinition exitType,
TreeMap<String,TypeDefinition> namedTypes,
TypeDefinition enterType)
Creates a new default argument handler for an instrumented method.
|
Modifier and Type | Method and Description |
---|---|
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.
|
int |
exit()
Resolves the offset of the exit value of the exit advice.
|
List<TypeDescription> |
getNamedTypes()
Returns a list of the named types in their declared order.
|
int |
named(String name)
Returns the offset of the local variable with the given name.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCopyingArguments, prepare, variable
argument
protected final MethodDescription instrumentedMethod
protected final TypeDefinition exitType
void
if no exit type is defined.protected final TreeMap<String,TypeDefinition> namedTypes
protected final TypeDefinition enterType
void
if no enter type is defined.protected Default(MethodDescription instrumentedMethod, TypeDefinition exitType, TreeMap<String,TypeDefinition> namedTypes, TypeDefinition enterType)
instrumentedMethod
- The instrumented method.exitType
- The exit type or void
if no exit type is defined.namedTypes
- A mapping of all available local variables by their name to their type.enterType
- The enter type or void
if no enter type is defined.public int exit()
exit
in interface Advice.ArgumentHandler
public int named(String name)
named
in interface Advice.ArgumentHandler
name
- The name of the local variable being accessed.public int enter()
enter
in interface Advice.ArgumentHandler
public int returned()
returned
in interface Advice.ArgumentHandler
public int thrown()
thrown
in interface Advice.ArgumentHandler
public Advice.ArgumentHandler.ForAdvice bindEnter(MethodDescription adviceMethod)
bindEnter
in interface Advice.ArgumentHandler.ForInstrumentedMethod
adviceMethod
- The resolved enter advice handler.public Advice.ArgumentHandler.ForAdvice bindExit(MethodDescription adviceMethod, boolean skipThrowable)
bindExit
in interface Advice.ArgumentHandler.ForInstrumentedMethod
adviceMethod
- The resolved exit advice handler.skipThrowable
- true
if no throwable is stored.public List<TypeDescription> getNamedTypes()
getNamedTypes
in interface Advice.ArgumentHandler.ForInstrumentedMethod
Copyright © 2014–2020. All rights reserved.