|
||||||
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.FieldInterceptor2
public class FieldInterceptor2
FieldInterceptor2 intercepts public field accesses and delegates task to FieldHandler.
Following code snippet is an example, how to initialize FieldInterceptor2:
InstrumentationContext ctx = new InstrumentationContext(); InstrumentationDescriptor id = new InstrumentationDescriptor(); id.addInclusionRule("samples.*"); ctx.addInstrumentationDescriptor(id); FieldInterceptor2 fi = new FieldInterceptor2(id, "samples*", this);FieldInterceptor2 intercepts only accessess to public fields.
NOTE: THIS CLASS IS OBSOLETE. USE FieldInterceptor INSTEAD
Constructor Summary | |
---|---|
FieldInterceptor2(InstrumentationDescriptor id,
FieldHandler handler)
Constructor. |
|
FieldInterceptor2(InstrumentationDescriptor id,
java.lang.String[] resolutions,
FieldHandler handler)
Creates new FieldInterceptor2. |
|
FieldInterceptor2(InstrumentationDescriptor id,
java.lang.String resolution,
FieldHandler handler)
Creates new FieldInterceptor2. |
Method Summary | |
---|---|
java.lang.Object |
getField(java.lang.Object o,
java.lang.String name)
Called by Jiapi runtime. |
void |
setField(java.lang.Object o,
java.lang.String name,
java.lang.Object value)
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 FieldInterceptor2(InstrumentationDescriptor id, FieldHandler handler)
id
- Instrumentation decsriptor, that this FieldInterceptor2
registers itself to.handler
- FieldHandlerpublic FieldInterceptor2(InstrumentationDescriptor id, java.lang.String[] resolutions, FieldHandler handler)
id
- Instrumentation decsriptor, that this FieldInterceptor2
registers itself to.resolutions
- Resolutions, that is used to select which
fields trigger interceptionhandler
- FieldHandlerpublic FieldInterceptor2(InstrumentationDescriptor id, java.lang.String resolution, FieldHandler handler)
id
- Instrumentation decsriptor, that this FieldInterceptor2
registers itself to.resolution
- Resolution, that is used to select which
fields trigger interceptionhandler
- FieldHandlerMethod Detail |
---|
public java.lang.Object getField(java.lang.Object o, java.lang.String name) throws java.lang.Throwable
o
- if target field is static,
this parameter holds a Class of the target field,
otherwise this is the instance, that fieldset should be
acted on.name
- Fully qualified name of the field
java.lang.Throwable
public void setField(java.lang.Object o, java.lang.String name, java.lang.Object value) throws java.lang.Throwable
o
- if target field is static,
this parameter holds a Class of the target field,
otherwise this is the instance, that fieldset should be
acted on.name
- Fully qualified name of the fieldvalue
- Value to set
java.lang.Throwable
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |