Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

do public ActionListener classes/actionPerformed() methods need Javadocs?

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
strictly following the guidelines, I guess they do..but what do you guys think?
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd say yes, they do. Which is a good incentive to make such classes non-public. The methods have to be public, because all interface methods are public, but if the implementing class is itself private, or a local or anonymous class, it doesn't matter what its methods are like, it won't appear in javadoc. Which is usually what I'd prefer, unless the listener is really supposed to be used by other classes. Listeners are probably the main reason anonymous classes were invented in the first place.
If your listener is package-level (either a standalone or nesteed class) thien I'm not so sure. When you generate your javadoc you get to choose what level of access is documented. The default is protected and public are documented, not package. You may want to document package too, for those times you were forced to make something package rather than private. If you set javadoc to document package methods & classes, then you should provide javadoc for all package methods and classes.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic