This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaBeans Naming : Question

 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is this valid JavaBeans naming way?

What I suppose (What K*B say), it is wrong due to mismatch:
"WibbleListener and BurbleListener"

One question running in mind:
Isn't like BurbleListener may be subclass of WibbleListener so allowed!!!


Please make it clear!

Source of the question: WhizLab
cmbhatt
[ April 15, 2007: Message edited by: Chandra Bhatt ]
 
Burkhard Hassel
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,



I hope I can paste in this two lines from page ten of K&B without breaking any copy right rules :
Examples of invalid JavaBean method signatures are: (...)
public void addXListener(MyListener m) // listener type mismatch

I don't think, it matters whether they are subclasses, because this convention are about naming. Class hierarchy is of no interest here.


Yours,
Bu.
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Burkhard,

Your answer is, what I supposed to be. But one of famous mock exam simulation
exam says it correct naming. Doubt arose from that point!


Thanks,
cmbhatt
[ April 15, 2007: Message edited by: Chandra Bhatt ]
 
Burkhard Hassel
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aha,

now I'm stuck as well.

Bu.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic