Re: Question on JavaBean specs to return something other that <code>void</code>
Posted By:
Bozidar_Dangubic
Posted On:
Friday, November 16, 2001 05:44 AM
1. it is not accepted.
2. if you specify something other than void in the setXXX(), you no longer have a JavaBean. period. it is now just a plain ol' java class since it is not in the JavaBeans specification. there are many components and tools that operate on JavaBeans. your class could not be used with them because it ceases to be JavaBean by returning a value from a setSomeProperty() call. keep in mind that most of these tools are using reflection. they look for setXXX methods that return void and if this is not the case for your class, it is not the JavaBean and cannot be utilized.