mercredi 16 janvier 2019

How do I get just the non-static (or just the static) fields or methods of a class, via reflection? [duplicate]

This question already has an answer here:

I see

MyClass.class.getDeclaredMethods()
MyClass.class.getDeclaredFields()

but how do I get just the non-static or just the static members?





Aucun commentaire:

Enregistrer un commentaire