I have the following Java class
public class MyClass <T extends MyInterface> implements RowMapper<MyInterface>
I'm implementing the following method:
@Override
public T mapRow(ResultSet rs, int arg1) throws SQLException {
How can I create an instance of 'T' type on that class?
I tried to define the T type class and use "myInstance.newInstance()" but I was unable to define it. Sending the Class as a parameter to the method and using the "newInstance()" method works, but I want to be able to do so without having to pass it as a param. Thanks!