I'm refactoring a code that uses the eclipse plugin but I want to turn it into pure java. The idea is to turn the String into something with this style:
Person@182f0db
[
name=John Doe
age=33
smoker=false
]
The current code is using the org.apache.commons.lang3.builder.ToStringBuilder
and org.apache.commons.lang3.builder.ToStringStyle
libraries:
ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
What is the pure java library that can do just that? I know I have StringBuilder
but I do not know a method that does this same action.