dcsimg
September 25, 2020
Hot Topics:

User Code: BeanBuilder 1.1

  • By Rakesh Nagar
  • Send Email »
  • More Articles »

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.






This article was originally published on March 28, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.


Thanks for your registration, follow us on our social networks to keep up-to-date