Platinum Partner

JAU (Java Annotation Based Utilities) 1.0

JAU 1.0 is ready for download from the project site: http://code.google.com/p/jau/.

The library will help you to implement common methods like .equals() or .hashCode() using annotations.

 

As promised in my last post, I did some performance analysis and here are results for toString() on this "real life" class (lower bar is better). The full performance report is here.

JAU toString() performance on a

As expected, manually implemented methods are faster than JAU (which uses reflection).

  • for "small" field types (byte, int, float) performance of equals()/hashCode() implemented with JAU depends heavily on the number of fields and is much worse than in manually implemented methods
  • for an object with one String field the value of the field must be of length 500 or higher for JAU overhead to become neglectable
  • toString() performance of JAU is really good even for classes with many small fields
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}