JavaEnterprise JavaUser Code: BeanBuilder 1.1

User Code: BeanBuilder 1.1

This is a utility for all those who hate coding JavaBeans — especially the javadoc for get and set methods. BeanBuilder enables you to generate JavaBean source code by declaring class attributes in a
descriptor file.

Silent features:

  • Primitive javadoc for get/set methods.
  • toString method to print the state of member variables.
  • Resolves attribute type from fully qualified class name to class name and add them in class import.
  • Enables user to specify initial values for member variables.

Usage: java BeanBuilder <Descriptor File> <Target Directory> [makeSer] makeSer flag makes the bean Serializable.

Example: java BeanBuilder NewBean.des . makeSer

Download

About the Author

Please send your comments or suggestions to Rakesh Nagar, a software engineer with L&T Infotech Ltd.

Java users are encouraged to submit samples of useful code for publication in the pages of Gamelan. Send your files and comments to editor@developer.com for consideration. Thank you.

Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends & analysis
This email address is invalid.

Latest Posts

Related Stories