Java Javadoc include Private

限于喜欢 提交于 2019-11-27 03:13:13

问题


I would like to generate javadocs for my application and i would also like to include private members.

I have found the following in the Javadoc documentation

       -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.

thank you.

EDIT: i found a way to generate javadoc from NetBeans 6.8. this is as follows:

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’.

i found this here

seems to generate docs as desired. thank you everyone.


回答1:


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.




回答2:


Have you looked at the man-page?

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


来源:https://stackoverflow.com/questions/3101339/java-javadoc-include-private

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!