A a = new A();
B b = a.b;
final ArrayList list = new ArrayList();
JVMTIInterface jvmti = new JVMTIInterface();
jvmti.notifyOnReferences("/tmp/tst.refs",new JVMTICallBack(){
int count=0;
public void notifyReference(long referenceHolder, long referencedObject,long classTag, long index, long method, byte referenceType)
{
list.add(new ReferenceDataPoint(referenceHolder, referencedObject,classTag, index, method, referenceType));