从 javadoc 帮助文本中,您可以使用这些标志/参数:
-public Show only public classes and members
-protected Show protected/public classes and members (default)
-package Show package/protected/public classes and members
-private Show all classes and members
-help Display command line options and exit
-doclet <class> Generate output via alternate doclet
-docletpath <path> Specify where to find doclet class files
-sourcepath <pathlist> Specify where to find source files
-classpath <pathlist> Specify where to find user class files
-exclude <pkglist> Specify a list of packages to exclude
-subpackages <subpkglist> Specify subpackages to recursively load
或者,您可以使用诸如 ant 或 maven 之类的构建工具来为您生成具有良好包装功能的 javadoc。这是我的一个项目的 ant javadoc 目标:
<target name="javadoc" description = "generate javadoc from source">
<delete dir="javadoc" verbose ="true"/>
<javadoc packagenames ="my.app.*"
sourcepathref = "javadoc.sourcepath"
author ="true"
destdir = "javadoc"
windowtitle = "${project-name} API"
linksource= "yes"
overview="${src}/overview-summary.html"
access="public">
</javadoc>
</target>