News for hackers. Stuff that matters.
Re:Background: how we got the generics we have (2020) by ohgodplsno on Thursday April 01, 2021 @08:28AM (#26659580)
There is a way-ish, which is passing a Class<T> as an additional parameter and doing clazz.newInstance().

Definitely not pleasant though.

Re:Background: how we got the generics we have (2020) by Felk on Thursday April 01, 2021 @08:30AM (#26659607)
For that particular use case it may be better to pass a constructor reference / new instance supplier to not rely on reflection.