public T getGenericity(Object o, Class<T> type){
if(type.isInstance(O)){
type.cast(o);
}
return null;
}
so we can use it like this :
User s = getGenericity(userObject,User.class);
public T getGenericity(Object o, Class<T> type){
if(type.isInstance(O)){
type.cast(o);
}
return null;
}
so we can use it like this :
User s = getGenericity(userObject,User.class);