How to generate path names of nested properties from java bean?

Given java bean def as below

public class MyBean { private String name; private String age; private Address address; } 

I am looking for a utility class that can generate all possible nested property names of nested properties from the above bean as

 "name", "age", "address.streetAddress" "address.city" "address.state" "address.zip.zip5" "address.zip.zip4" 

Currently, the apache bean utils package can generate properties based on the bean, but not for internal objects such as an address. Is there a useful class from Spring? I assume that objects such as Spring Roo need a utility if they should automatically generate Forms with the given command object. Any help is much appreciated. thanks sri

+4
source share

Source: https://habr.com/ru/post/1396495/


All Articles