Class Model<T>{
private T t;
.....
private void someMethod(){
//now t is null
Class c = t.getClass();
}
.....
}
Of course it throws NPE.
Class c = t.getClass();
What syntax should i use to get class of T if my instance is null? Is it possible?