Unfortunately, you will certainly have to change your method to:
private <T> T evaluate(Class<T> clazz, String expression)
and then pass clazz as your second parameter. Not as short as you expected.
Unfortunately, you will certainly have to change your method to:
private <T> T evaluate(Class<T> clazz, String expression)
and then pass clazz as your second parameter. Not as short as you expected.