How do I determine if a field is private or protected using reflection in Java?
From this SO answer, I've gathered you can't access a public field without setting setAccessible(true). I could determine if a field is public or not with isAccessible(). However, how would I determine if it were public or private?
Aucun commentaire:
Enregistrer un commentaire