Performance of BeanUtils vs. ReflectionToStringBuilder (for use in Bean classes)
I have a large number of Java bean classes in my web application, and I am trying to find a simple way to implement the toString() methods in these beans. The toString() method would be used for logging throughout the application, and should print the attribute-value pairs of all attributes in the bean. I am trying out two alternatives: 1. BeanUtils.describe() (Apache commons-beanutils) 2. ReflectionToStringBuilder.toString() (Apache commons-lang) Since this is a web application expected to have high traffic, the implementation has to be lightweight and should not impact performance. (Memory