I'd like to write some code that would perform two different tasks:
1) Find all object references in the JVM that implement an interface (or all references of a class).
2) Given an object reference, find the references of all objects that contain a reference to the object.
Is this possible? Thanks!