I have a function which i want to make generic. I want below code
public String list(){
List<EMovieCategory> dataList = DBCompanyContent.getInstance().getDataByDocType(EMovieCategory.class);
return "";
}
Be something like
public String list(Class cls){
List<WHAT TO WRITE HERE > dataList = DBCompanyContent.getInstance().getDataByDocType(cls);
return "";
}
I couldn`t figure out what to write inside List<***>
Aucun commentaire:
Enregistrer un commentaire