The canonical use for ReflectionToStringBuilder is as follows
public String toString() {
return (new ReflectionToStringBuilder(this) {
protected boolean accept(Field f) {
return super.accept(f) && !f.getName().equals("password");
}
}).toString();
}
Is it possible to somehow not repeat this if it has to be done multiple times. I really think so but maybe someone more advanced than me might have a suggestion. What I really want to do is actually add a method.
unless I’m missing something.