lundi 2 mai 2016

java reflection library which support to get nested object field values.

Is there knowing java reflection library which can get value of fields easily. Ex . If I have Address Object inside User Object. And Address object have city attribute.

public class Address {
    private String city;
}

public class User {
    private String name;
    private Address address;
}

Then i want to pass address.city as parameter with User Object and i want to get city of user.

Is there any library which support my requirement.





Aucun commentaire:

Enregistrer un commentaire