I'm looking for a way to get all instantiated objects of a given type in Java.

With Ruby you can use the ObjectSpace.each\_object method:

```
a = 102.7
b = 95.1
ObjectSpace.each_object(Numeric) {|x| p x }

```

would give 

```
95.1
102.7

```