3

I'm not quite sure how I'm supposed to document Java packages using Doxygen. In C++ you could simply describe a namespace as it's declared but Java packages are never really explicitly declared. I tried adding a description before the package mypackage.subpackage; declaration but to no avail. What I found that sort of works is if I were to make a new file and simply do

/**
@namespace mypackage.subpackage
@brief my description
*/

it would show up on the wiki, but it's strange because some of the packages are described correctly, and the rest are duplicated (the package to be described isn't described, instead another package that's empty and has the same name is created)

Does anyone know the correct way to describing a Java package in Doxygen?

2

2 Answers 2

2

A copypaste from stackoverflow.com/questions/7368584/doxygen-and-package-html for easy reference:

The new alternative way to provide documentation for a Java package is to use a file named package-info.java instead of package.html. (The file name is intentionally chosen not to be a valid class name.)

It has a different syntax:

/**
 * any javadoc comments (including tags)
 */
package name;
Sign up to request clarification or add additional context in comments.

Comments

1

If you're using Java 1.4 or lower you have to have a package.html which is a fully formed html file.

After 1.4 you can use the package-info.java file with the format

/**
 * com.foo is a group of bar utils for operating on foo things.
 */
package com.foo;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.