Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Selective javadoc

Thread view: 
Chris - 09 Mar 2008 21:14 GMT
We publish a library. Part of the API we'd like to document, and part of
it needs to remain closed.

I'd love to be able to put a tag in the Javadoc for a class that would
tell the Javadoc tool to generate the javadoc or not. It would also be
nice to include/exclude specific methods.

I can find nothing in the Javadoc docs that supports this. I'm wondering
if there is a fancy doclet out there that would do it?
Lew - 09 Mar 2008 23:26 GMT
> We publish a library. Part of the API we'd like to document, and part of
> it needs to remain closed.
[quoted text clipped - 5 lines]
> I can find nothing in the Javadoc docs that supports this. I'm wondering
> if there is a fancy doclet out there that would do it?

$ javadoc -help
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
 ...
-sourcepath <pathlist>    Specify where to find source files
 ...
-exclude <pkglist>        Specify a list of packages to exclude
 ...

Also, javadoc will exclude package-private classes by default.  It's good
design anyway to keep such classes package-private and link them via an
accessible interface.

Same reasoning for methods - keep methods you don't want documented at private
or package-private access.

By judiciously combining inclusive parameters with exclusionary options one
can control javadoc pretty finely.

For a terse but complete description of the options, see
$ man javadoc

Even more at
<http://java.sun.com/javase/6/docs/technotes/tools/solaris/javadoc.html>
<http://java.sun.com/javase/6/docs/technotes/tools/windows/javadoc.html>

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.