I am building a profiler Using Java Instrumentation + Javaassit to intercept all the method, constructor calls. I would also like to intercept the Class Field access (Would like to monitor the static fields data to prevent misuse).
Class A { public static String data = "1"; public static void main(String[] s) { //I would like to intercept this field access System.out.println(data); //I would like to intercept this field data modification data ="2"; } } Is this possible to intercept them? Thanks in Advance