vendredi 25 octobre 2019

How to access and set object of i18n object or any private object inside class using reflection?

1) Question: I want to access any class field through reflection.? (Field). i.e. getDeclaredField("i18n"). So should "Field" considered as String, Int variable, Local variable. Also object considered in Field. If so how to access object through reflection?

Class X{ private I18nUtils i18n; // object. X(){ i18n.getText("--some string--"); } }

How to access and set i18n object.





Aucun commentaire:

Enregistrer un commentaire