• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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-coderanch. The methods have to be coderanch, because all interface methods are coderanch, 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic