• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaBeans Naming : Question

 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aha,

now I'm stuck as well.

Bu.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic