lundi 14 décembre 2015

How to check that T is Collection of String using reflection? [duplicate]

I have the following method:

public <T> void meth(T t){

}

Inside method I need to check that t is Collection of String(List<String>, Set<String>, etc)

I understand that I can do it using reflection but I don't know how certainly.





Aucun commentaire:

Enregistrer un commentaire