I would like to ask if please someone can suggest me which is the most suitable instrumentation library for accomplishing the following task:
Given a huge Java program source code I need to instrument it in order to run the program and log the following information:
For each class and for each access to its fields
Probably the best way to do this kind of trace is using AOP. There are several mature libraries for AOP in java. To start something with, take a look at this example.
I'm not sure about logging direct access to fields, but you could read them with getters (private or protected if you don't want to expose these fields to public).