Given a class (ex: foo.bar.MyClass), how can I get a count of the number of instances of that class existing within the JVM?
Thanks
EDIT: I'm looking for the code that will retrieve this count.
EDIT: More specifically, an implementation of the method Integer getInstanceCount(Class c)