Jenerate is a Java Generation plugin for Eclipse that provides customizable code generation for Java classes.
Jenerate provides code generation for methods like:
- hashCode() and equals() (ALT+SHIFT+G then H)
- toString() (ALT+SHIFT+G then S)
- compareTo() (ALT+SHIFT+G then C)
The generated methods can use internal java.util.Objects class or external libraries such as Apache commons-lang Builders and Google Guava.
A certain number of parameters can be customized in the Jenerate preference page in eclipse (Window > Preferences > Java > Jenerate).
For more information, issues, pull requests, see the project page on GitHub.
You can install the Jenerate plugin via the Eclipse Marketplace or using the Jenerate update site from within Eclipse:
http://maximeaudrain.github.io/update/You can access previous versions of the plugin at
http://maximeaudrain.github.io/update/X.X.Xwhere X.X.X is the version you want to retrieve
- Fixed a bug where the "Append super" option is disabled if the superclass is included a jar file (Contribution by Helospark)
- Support for Class#cast(Object) and Class#isInstance(Object) for equals() and hashCode() generation. (Contribution by Martin Filser)
- Added generation strategies for hashCode() and equals() using the internal java.util.Objects class.
- Allow use of two new ToString styles provided with the version 3.4 of Apache Commons lang.
- Added Google Guava support for all methods content generation.
- Add tooltip on the toString dialog that shows how the output of the toString() would look like (based on the javadoc). (Contribution by mwensveen-nl)
- Add the option to use getClass instead of instanceof in the equals method. (Contribution by mwensveen-nl)
- Changed javadoc to use @inheritdoc instead of the old style of javadoc. (Contribution by melloware)
Jenerate is a fork of commons4e. It was forked to make it alive again and respond to users need for new functionalities.
Jenerate is under the EPL v1.0.
Any contributions are welcome!