Listing attributes of a bean with Java Bean’s introspection API

Sometimes it is required to list entire attributes of a bean. They are usually fields of a bean with setters and getters. but this isn’t a requirement to list the attributes of a bean using Java Bean’s Introspection API. Setters and getters define the attributes of a bean and not actual attributes. The mapping utilities use Java Bean’s Introspection API to list attributes of bean using setters and getters.

Listing attributes of a bean: Here is an example to show how to list properties of DashBoard bean.

1.Java Bean

2. Listing Attributes of Bean

3.Output

1 thought on “Listing attributes of a bean with Java Bean’s introspection API”

Leave a Comment