Re:Java Generics FAQs
by TheLoneWolfling on Friday April 17, 2015 @08:12AM
(#9393773)
Right. And now you're pushing what should be a compile-time error to runtime, and slowing down performance with runtime checks to boot.
Re:Java Generics FAQs
by slantedview on Friday April 17, 2015 @03:40PM
(#9396708)
Indeed, but it allows library authors the ability to write nicer APIs without having to pass Class references around - they can be resolved.
There are better ways of resolving type arguments, such as on Handler implementations, at runtime.
See https://github.com/jhalterman/typetools