r/java • • Apr 24 '24

Java library for generating getters and setters

https://github.com/bowbahdoe/magic-bean

Updates since the last time I shared this

  • Minimum compatibility bumped to Java 21

  • Generated code now uses switch expressions for (maybe too clever) type safe casts

  • Options have their names shortened. generateToString -> toString_, generateEqualsAndHashCode -> equalsAndHashCode

  • New "extends" option for dealing with more exotic cases.

7 Upvotes

Duplicates