C
Chris
I would like to use some of the new functionality in JDK 1.5 and 6, but
I have to run under 1.4. I've managed to duplicate the needed
functionality in 1.4 using an inefficient method.
If my app is running in 1.5, I'd like it to use the native function,
else use my slow/ugly function.
What's the best way to set up a Factory to return the appropriate class?
The class I need does *not* implement an interface that exists in 1.4.
The best method that I've been able to come up with uses an excessive
number of interfaces and abstract classes. There's probably a better way.
(The function I need is read-write locking in the concurrency utilities,
though I don't that matters for this question.)
I have to run under 1.4. I've managed to duplicate the needed
functionality in 1.4 using an inefficient method.
If my app is running in 1.5, I'd like it to use the native function,
else use my slow/ugly function.
What's the best way to set up a Factory to return the appropriate class?
The class I need does *not* implement an interface that exists in 1.4.
The best method that I've been able to come up with uses an excessive
number of interfaces and abstract classes. There's probably a better way.
(The function I need is read-write locking in the concurrency utilities,
though I don't that matters for this question.)