简体   繁体   English

Java Javadoc 包括 Private

[英]Java Javadoc include Private

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 ... .它应该是这样的: javadoc -private ... I need to know how to provide the root directory and destination directory for the generated html doc files.我需要知道如何为生成的 html doc 文件提供根目录和目标目录。

thank you.谢谢你。

EDIT: i found a way to generate javadoc from NetBeans 6.8.编辑:我找到了一种从 NetBeans 6.8 生成 javadoc 的方法。 this is as follows:如下:

NetBeans Java projects typically have a parameter for this in the project's properties section. NetBeans Java 项目通常在项目的属性部分中有一个用于此的参数。 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'.在出现的 Project Properties 窗口中,Documenting 节点包含一个标记为“Include Private and Package Private Members”的复选框字段。

i found this here我在这里找到了这个

seems to generate docs as desired.似乎根据需要生成文档。 thank you everyone.谢谢大家。

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 documentation and this section .但您也可以查看javadoc 文档和本

Have you looked at the man-page?你看过手册页吗?

https://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javadoc.html https://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javadoc.html

It contains a section of simple examples.它包含一个简单示例的部分。

Try this for instance试试这个

javadoc -private -d /home/html -sourcepath /home/src

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM