简体   繁体   中英

How do I stop javadoc from generating documentation for super classes?

Context: NetBeans 8.0.2, Java 8.0.0

I have written a couple of classes to encapsulate dialogs to assist my students in writing simple, visual applications without a sophisticated knowledge of GUI programming - Tic-Tac-Toe, for example. Unfortunately I made some of the classes extend JFrame, and now my javadoc is littered with long lists of features inherited from the class hierarchy, making it look kind of intimidating.

I know I can reformulate my implementation strategy to "use" a JFrame rather than to "be" a JFrame, but is there some simpler way to tell javadoc just not to generate documentation based on the class hierarchy?

Thanks.

Edit :

I am using the NetBeans generator out-of-the-box, with these additional options:

-stylesheetfile C:\Users\jack\Documents\NetBeansProjects\CartesianPlane/src/customStylesheet.css -overview "C:\Users\jack\Documents\NetBeansProjects\CartesianPlane/src/Overview.html" -subpackages edu.pcwe.uw.javaintro.cartesian_plane -exclude edu.pcwe.uw.javaintro.cartesian_plane.test

This question is already listed in the Javadoc FAQ

A16. How can I exclude or skip certain public members or classes from being documented?

[...] There is currently no Javadoc option to hide, exclude or suppress public members from the javadoc-generated documentation .

Since it is automatically generated, and you have no option to exclude, you have to deal with it.

There is an issue scheduled for version 9 where an exclude tag is requested.

You might want to read the entire request as it offer workaround for some exclusion, but I'm not sure it would work for your case.

Edit :

The yDoc (now renamed yWorks as per your comment) doclet mentionned in the request I linked offer the possibility to do some exclusion using y.exclude .

Note that you will have to specify y.exclude on your super class. Since JFrame is part of the standard JDK, you won't be able to specify it. Unless you want to recompile it, for sure but it is good to know that you have a workaround to do it for your own classes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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