Is there way to pass a Class variable when instanciating a new template class named TemplateClass or is it absolutely a non-sens ?
Example of something i would like to do but that do not compile:
final List<TemplateClass> fields = new ArrayList<>();
public void loadDataFields() {
for(Field x : ClassA.class.getDeclaredFields()) {
fields.add(new TemplateClass<x.getClass()>());
}
}
Edit
Here is the TemplateClass :
public class TemplateClass<T extends Comparable> {
int count;
T min;
T max;
}