Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javabeans

 
nirail rail
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI

is there any software to create javabeans?

thanks
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaBeans are nothing but java classes with certain standards.

1. you should have public no-args constructor
2. have getter and setter methods
3. after stripping the get and replacing the first character of whats left to lower case is your property name.
4. property names should be derived from methods and not from members of the class.
5. return type of getter and argument of setter should match.

These are some of the rules you should adhere to when you write a java bean.
 
nirail rail
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vishnu Prakash


i know i was intrested in knowing is there any IDE / Software which will return a javabean class if we pass it with varible names

thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most IDEs have a wizard for creating Java Objects.
If you follow the guidlines posted by Vishnu in this thread, you should be able to create Javabeans with any of them.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic