|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalt.jiapi.event.EventProducer
alt.jiapi.interceptor.InvocationInterceptor
public class InvocationInterceptor
InvocationInterceptor intercepts method invocations and delegates invocations to InvokeHandler.
Following code snippet is an example, how to initialize InvocationInterceptor:
InstrumentationContext ctx = new InstrumentationContext(); InstrumentationDescriptor id = new InstrumentationDescriptor(); id.addInclusionRule("samples.*"); ctx.addInstrumentationDescriptor(id); InvocationInterceptor ii = new InvocationInterceptor(id, "java*",this);
Constructor Summary | |
---|---|
InvocationInterceptor(InstrumentationDescriptor id,
java.lang.reflect.InvocationHandler handler)
Constructor. |
|
InvocationInterceptor(InstrumentationDescriptor id,
java.lang.String[] resolutions,
java.lang.reflect.InvocationHandler handler)
Creates new InvocationInterceptor. |
|
InvocationInterceptor(InstrumentationDescriptor id,
java.lang.String resolution,
java.lang.reflect.InvocationHandler handler)
Creates new InvocationInterceptor. |
Method Summary | |
---|---|
java.lang.Object |
invokeMethod(java.lang.Object o,
java.lang.String name,
java.lang.Object[] args,
java.lang.String signature)
Called by Jiapi runtime. |
Methods inherited from class alt.jiapi.event.EventProducer |
---|
getResolutions, isProtected, isProtected, match, protect, release |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InvocationInterceptor(InstrumentationDescriptor id, java.lang.reflect.InvocationHandler handler)
id
- Instrumentation decsriptor, that this InvocationInterceptor
registers itself to.handler
- InvocationHandlerpublic InvocationInterceptor(InstrumentationDescriptor id, java.lang.String[] resolutions, java.lang.reflect.InvocationHandler handler)
id
- Instrumentation decsriptor, that this InvocationInterceptor
registers itself to.resolutions
- Resolutions, that is used further to select which
methods will trigger events to be produced.handler
- InvocationHandlerpublic InvocationInterceptor(InstrumentationDescriptor id, java.lang.String resolution, java.lang.reflect.InvocationHandler handler)
id
- Instrumentation decsriptor, that this InvocationInterceptor
registers itself to.resolution
- Resolution, that is used to select which
methods will be intercepted.handler
- InvocationHandlerMethod Detail |
---|
public java.lang.Object invokeMethod(java.lang.Object o, java.lang.String name, java.lang.Object[] args, java.lang.String signature) throws java.lang.Throwable
o
- if invocation is being made to an static method,
this parameter holds a Class of the called method,
otherwise this is the instance, that invocation should be
acted on.name
- of the method to callargs
- Arguments of the method
java.lang.Throwable
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |