If you know the fields, why use ReflectionToStringBuilder? Why not use a regular ToStringBuilder? That allows you to append each field you want. Yes, you have to type each field name twice (for the name and the value), but is that so much more work that it would require complicating the ReflectiontoStringBuilder API?

On 02/07/2021 20:06, Daniel Augusto Veronezi Salvador wrote:
Hello,

This is my first interaction with this community, so I may commit some mistakes 😁.

*ReflectionToStringBuilder* has methods to exclude fields from *toString*; If we have an object with several fields and want to reflect only a some, we have to list all the fields that we don't want to reflect and pass to *excludeFieldNames*. I did this trick locally, but I was wondering if it would be valid to implement a way to pass the fields that we want and reflect only the selected fields in *ReflectionToStringBuilder*.

As the contributing documentation guide, I submitted an issue on Jira too (https://issues.apache.org/jira/browse/LANG-1662).


Best regards,

Daniel Salvador

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to