Details
Description
It's possible to dynamically deduce the type for a collection at runtime using Method.getGenericType/Parameters calls, and checking instanceof on the returned Type to determine whether it is parametrised and get the component type that way. This would then allow users to use collections without specifying collection component types externally.
Also, the code should remain jdk1.3/4 compatible and not kick in when running in those environments.
This is done. There is currently no way to determine the component type on jdk 1.4 yet though.