5 ms·
YES! to both parents here. Type erasure is a bitch. Need to pass in a class type, but it's of a list? List<YourType> list = new ArrayList<>(); yourfunc(list.g
by brianbarker 10y ago
YES! to both parents here. Type erasure is a bitch.
Need to pass in a class type, but it's of a list?
List<YourType> list = new ArrayList<>();
yourfunc(list.getClass());
C# got all this junk right.
- benjiweber 10y agoYou can now use lambdas as generic type references http://benjiweber.co.uk/blog/2015/08/04/lambda-type-references/ http://benjiweber.co.uk/blog/2015/08/04/lambda-type-referenc...