lundi 14 septembre 2015

Get a Class

Is it possible to get something similar to Class<List<Data>>.class? I read you can't call .class because of how it works interanlly, so I was wondering if maybe using something similar to new ArrayList<Data>().getClass() might work? That one in particular doesn't work as the returned class is Class<? extends List<Data>> so I'm out of options, is it even possible?

Context: I'm trying to parse a List<Data> using square/moshi but the library seems to be on alpha so there is no documentation on it.





Aucun commentaire:

Enregistrer un commentaire