Java Javadoc 包括 Private
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3101339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java Javadoc include Private
提问by iTEgg
I would like to generate javadocs for my application and i would also like to include private members.
我想为我的应用程序生成 javadoc,我还想包含私有成员。
I have found the following in the Javadoc documentation
我在Javadoc 文档中发现了以下内容
-private
Shows all classes and members.
Could you please help me by giving an example of the execution of this?
您能否通过举例说明执行此操作来帮助我?
It should be something like: javadoc -private .... I need to know how to provide the root directory and destination directory for the generated html doc files.
它应该是这样的:javadoc -private ...。我需要知道如何为生成的 html doc 文件提供根目录和目标目录。
thank you.
谢谢。
EDIT:i found a way to generate javadoc from NetBeans 6.8. this is as follows:
编辑:我找到了一种从 NetBeans 6.8 生成 javadoc 的方法。如下:
NetBeans Java projects typically have a parameter for this in the project's properties section. You can right-click the project name in the Projects Window and select Properties. In the Project Properties window that appears, the Documenting node contains a checkbox field labeled ‘Include Private and Package Private Members'.
NetBeans Java 项目通常在项目的属性部分中有一个用于此的参数。您可以在“项目”窗口中右键单击项目名称并选择“属性”。在出现的 Project Properties 窗口中,Documenting 节点包含一个标记为“Include Private and Package Private Members”的复选框字段。
i found this here
我在这里找到了这个
seems to generate docs as desired. thank you everyone.
似乎根据需要生成文档。谢谢大家。
采纳答案by YuppieNetworking
From the command line, it says
从命令行,它说
javadoc [options] [packagenames] [sourcefiles] [@files]
So it would be something like:
所以它会是这样的:
javadoc -private -d output/directory -sourcepath src/java
But you may also take a look to the javadoc documentationand this section.
但您也可以查看javadoc 文档和本节。
回答by aioobe
Have you looked at the man-page?
你看过手册页吗?
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html#examples
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/javadoc.html#examples
It contains a section of simple examples.
它包含一个简单示例的部分。
Try this for instance
试试这个
javadoc -private -d /home/html -sourcepath /home/src

