title: Are there any tools to visualize the objects being used in a program?
body: <p>I'm not sure how useful this would be, but I thought it might be neat to visualize the objects being used in my program and which objects are being referenced from where. I'm guessing it would generate some data that would be used by a program like graphviz. Are there any tools that do this, otherwise how hard would it be to do this myself? Ideally this would work for any arbitrary program, though if necessary I could make some modifications to the code (such as to add a dumpObjects() call or whatever)</p>
  
  <p>I'm interested in doing this for java, but if there are solutions for other languages please post those too.</p>