mardi 20 avril 2021

Java reflection : Object has a field Set

So I have an object that contains a set of an object, how can I use reflection to tell what type of set it is?

I can do obj.getClass().getDeclaredField(propertyName).getType(); to find out its a set, but how do I find out its a Set of MyObject, is that possible?





Aucun commentaire:

Enregistrer un commentaire