public abstract class AGenericInterceptor extends ASDKPlugin
Constructor and Description |
---|
AGenericInterceptor() |
Modifier and Type | Method and Description |
---|---|
int |
getInterceptorId()
Overriden to return interceptor id
if implementation on this intended to be used in micro java agent framework
|
abstract java.lang.Object |
onMethodBegin(java.lang.Object invokedObject,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] paramValues)
This method is invoked at the start of the instrumented method.
|
abstract void |
onMethodEnd(java.lang.Object state,
java.lang.Object invokedObject,
java.lang.String className,
java.lang.String methodName,
java.lang.Object[] paramValues,
java.lang.Throwable thrownException,
java.lang.Object returnValue)
This method is invoked at the end of the instrumented method.
|
getAgentPluginDirectory, getLogger, getNewReflectionBuilder, getRules, initializeRules
public abstract java.lang.Object onMethodBegin(java.lang.Object invokedObject, java.lang.String className, java.lang.String methodName, java.lang.Object[] paramValues)
invokedObject
- The invoked object of the instrumented methodclassName
- The name of the class that defines the instrumented methodmethodName
- The name of the instrumented methodparamValues
- The parameter values for this invocation of the instrumented methodonMethodEnd(Object, Object, String, String, Object[], Throwable, Object)
public abstract void onMethodEnd(java.lang.Object state, java.lang.Object invokedObject, java.lang.String className, java.lang.String methodName, java.lang.Object[] paramValues, java.lang.Throwable thrownException, java.lang.Object returnValue)
state
- The state object returned from
onMethodBegin(Object, String, String, Object[])
invokedObject
- The invoked object of the instrumented methodclassName
- The name of the class that defines the instrumented methodmethodName
- The name of the instrumented methodparamValues
- The parameter values for this invocation of the instrumented methodthrownException
- The exception thrown during the invocation of the instrumented method that is not caught.
Is null if an exception is not thrown and the method exits normally.returnValue
- The return value of the method. Is null if the return type is void or the method
exits with an exception.public int getInterceptorId()