R
Rhino
I've just discovered that it is possible to create package-level Javadoc
comments in Java 1.5.0 by putting them in a file called package-info.java. I
like the idea of documenting my packages but I'm finding the documentation
unclear on where exactly this package-info.java file is placed, particularly
when I'm using Eclipse. The documentation seems to be saying that I should
put this file in my source tree under the package being documented.
I tried creating a Class named package-info in Package Explorer within the
package which I'm trying to document but Eclipse wouldn't let me do this: it
didn't want to create a Class named package-info. The same problem occurred
when I tried to create an annotation named package-info within my package.
Then I created a File named package-info.java in my package and put a single
Javadoc comment in it:
/**
@author Fred Flintstone
*/
but when I generated my Javadocs, this Author information doesn't show up.
Therefore, I have the following questions:
1. What type should the package-info.java file be, e.g. File, Class,
Annotation, or something else?
2. Where do I put this file so that this documentation appears in my
Javadocs at the appropriate page?
3. Do I need to modify my current Javadocs generation step - I'm using the
Javadoc task in Ant - to pick up these package-info files? If yes, what
changes do I need to make?
comments in Java 1.5.0 by putting them in a file called package-info.java. I
like the idea of documenting my packages but I'm finding the documentation
unclear on where exactly this package-info.java file is placed, particularly
when I'm using Eclipse. The documentation seems to be saying that I should
put this file in my source tree under the package being documented.
I tried creating a Class named package-info in Package Explorer within the
package which I'm trying to document but Eclipse wouldn't let me do this: it
didn't want to create a Class named package-info. The same problem occurred
when I tried to create an annotation named package-info within my package.
Then I created a File named package-info.java in my package and put a single
Javadoc comment in it:
/**
@author Fred Flintstone
*/
but when I generated my Javadocs, this Author information doesn't show up.
Therefore, I have the following questions:
1. What type should the package-info.java file be, e.g. File, Class,
Annotation, or something else?
2. Where do I put this file so that this documentation appears in my
Javadocs at the appropriate page?
3. Do I need to modify my current Javadocs generation step - I'm using the
Javadoc task in Ant - to pick up these package-info files? If yes, what
changes do I need to make?