Closed jbek7 closed 7 years ago
Never mind... I was able to create it by extending DefaultToStringStrategy
Posting the code in case some also needs it:
public class SimpleToStringStrategy extends DefaultToStringStrategy {
@Override
public boolean isUseIdentityHashCode() {
return false;
}
@Override
protected void appendClassName(StringBuilder buffer, Object object) {
if (object != null) {
buffer.append(getShortClassName(object.getClass()));
}
}
}
Yes, strategy is the way to go. You can also configure it to be the default strategy when generating code.
Hello, The plugin is working fine but am not able to find a way to configure ToString Style (like apache-commons
ToStringBuilder
) or is there any documentation on it?Thanks!