Why is there no java.lang.ref.StrongReference
class in jdk1.7? (see JDK-6392701)
I am trying to implement a behavior that needs to be able to store Objects in different reference strengths. So my first thought was to use a field of type Reference<T>
and asign a Referece with of desired strength. But there is no class for Strong references and extending Reference
manually seems like the completely wrong direction.
The alternative would be to have two field, one that is a Reference
and the other that is of the desired type and have only one set but a Reference
that strongly stores the values would make the code much cleaner.