• Post Reply Bookmark Topic Watch Topic
  • New Topic

Package Comment Files  RSS feed

 
Alberto Ivo
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used package.html to document the packages of my app, but I saw some odd news in java5:

To create a package comment file, you have a choice of two files to place your comments:

* package-info.java - Can contain a package declaration, package annotations, package comments and Javadoc tags.
This file is new in JDK 5.0, and is preferred over package.html.
* package.html - Can contain only package comments and Javadoc tags, no package annotations.

Questions:

- Why a Java class is preferred over package.html?
- Anyone uses this new class package-info.java? Any positive feedback?
- Do you guys know some good tutorial to teach me the best pratices to use this file?

Thanks in advance.
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why a Java class is preferred over package.html?


I suspect it's preferred because
1) it's the newer way to specify
2) it can provide support the html cannot (annotations)
3) it uses the same javadoc-in-java-code parsing that the rest of the tool uses
4) there could easily be HTML that's not handled well by the parser


No, I haven't used it, yet.
 
Alberto Ivo
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bill..

Anyone else has another opinion and tutorial that help me 'implement' this file with templates and good pratices?
 
Alberto Ivo
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found one:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!