Does anyone know to generate the following generic method declaration using CodeModel:
public <T> T getValue(Class<T> clazz){...}
using:
ValueType value = getValue(ValueType.class);
It seems that it is not handled by the existing implication.
I know that I can process the code as follows, but it requires a throw:
public Object getValue(Class class){...}
using:
ValueType value = (ValueType)getValue(ValueType.class);
Obviously, this is a bit dirty due to the actor.
John Ericksen
source share