Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
What about enabling the builders (ToStringBuilder, EqualsBuilder, etc.) that use reflection to use annotations to find the field to include?
Something like:
ToStringBuilder.annotationsBasedToString(Object object, Class<Annotation> class, Class<?> reflectUpToClass)
One could use the JPA-Annotation @ID for example, espescially for Equals- and HashCodeBuilder. There should also be some default annotation comming with LangTwo.
Usage:
public class User
{
@StringRepresentation
@EqualsAndHashCode
private String name
@StringRepresentation
private String email;
private String password;
// ...
@Override
public String toString()
@Override
public boolean equals(Object other)
@Override
public int hashCode()
}
Attachments
Attachments
Issue Links
- is duplicated by
-
LANG-449 Implement equals, hashCode and toString replacement
- Closed