ChainInstrumentor setDispatcher = new MethodDispatcherInstrumentor();
GrepInstrumentor grepWriteAccess =
// Following line fixes bug that we instrument
// on field accesses that were synthesized by Jiapi itself.
new GrepInstrumentor(new FieldAccessStrategy("*__jiapi_field*", true, FieldAccessStrategy.WRITE_ACCESS));
grepWriteAccess.setResolutions(getResolutions());
ChainInstrumentor afterSet = new TailInstrumentor();
ChainInstrumentor callFieldSet =
new MethodCallInstrumentor(new FieldSetHook(this));
InstrumentorChain setChain = new InstrumentorChain();
setChain.add(setDispatcher);
setChain.add(grepWriteAccess);
setChain.add(afterSet);
setChain.add(callFieldSet);
ChainInstrumentor getDispatcher = new MethodDispatcherInstrumentor();
GrepInstrumentor grepReadAccess =
// Following commented line fixes bug that we instrument
// on field accesses that were synthesized by Jiapi itself.
new GrepInstrumentor(new FieldAccessStrategy("*__jiapi_field*", true, FieldAccessStrategy.READ_ACCESS));
grepReadAccess.setResolutions(getResolutions());
ChainInstrumentor beforeRead = new HeadInstrumentor();
ChainInstrumentor callFieldGet =