vendredi 18 mai 2018

How to get a reference to the `Class

For instance, I can have

Class c = Map.class;

But what if I need c to refer to the class Map<String, ValueClass>?

I want to do something which expresses

Class c = (Map<String, ValueClass>).class;

My use case is that I need to do this so that I can pass c to getConstructor





Aucun commentaire:

Enregistrer un commentaire