• 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

Disabling Javadoc for Methods

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to disable the generation of Javadoc for a specific class method? I have some protected methods in a class that I would rather not be part of the "published" API but the methods must have protected access because the class is subclassed in another package. I don't see one but I was wondering if there was a tag that would allow me to specify that generation of Javadoc should be disabled for these methods. Not generating Javadoc for protected methods is not feasible as there are a number of protected methods that should be "published".
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
perhaps in conjunction with annotations?

Why not mention your intention in the docs itself?

If a developer finds out, that there are undocumented methods, he might think the documentation is out of sync - if you tell him, not to access method x directly, it's his fault if he does.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just thinkin out loud ... don't hurt me if this is dumb ... Any chance to add a layer of inheritance ... put your double secret methods in a base class in a package that you omit from JavaDoc entirely, extend those classes in a with the methods people should see documented package?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a common problem - see http://www.martinfowler.com/ieeeSoftware/published.pdf

We wrote our own doclet that recognizes @published tags. In fact we wrote two: one that simply marks published members, and one that filters so that only published members are shown.

Lately we've begun to try a different approach, though: we've put the published API into its own module, mostly consisting of interfaces and factories. The actual implementation is placed into a different module and can add as many methods as needed.

In my opinion the latter works better. Only drawback is that in the implementation we sometimes need to cast from a published interface to an actual implementation to call a non-published method internally.
reply
    Bookmark Topic Watch Topic
  • New Topic