aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S: What types do you comment with javadoc? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S: What types do you comment with javadoc?" Watch "B&S: What types do you comment with javadoc?" New topic
Author

B&S: What types do you comment with javadoc?

Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Hi all,

my assignment says:


... javadoc style comments must be used for each element of the public interface of each class ...


To my opinion that means to provide javadoc comments for all public methods in all classes.

What about the other types? As far as I see we have these type that can be provided with javadoc comments:

  • javadoc Comments for Classes
  • javadoc Comments for Interfaces
  • javadoc Comments for Contructors
  • javadoc Comments for Methods
  • javadoc Comments for Exceptions
  • javadoc Comments for Variables


  • Shall we provide javadoc comments for all types? What about the private types?

    Regards,
    Darya


    SCJP, SCJD, SCWCD, SCBCD
    Alex Belisle Turcot
    Ranch Hand

    Joined: Apr 26, 2005
    Posts: 516
    Hi,


    Yes, I believe it means "comments for all public methods in all classes".

    That includes at least the public constructors, methods, variables (probably none). I would do it for interfaces also. Document exceptions for public methods. And I would also do it for the general comment of the class/interface.

    What's the rest of that sentence ?

    bye,
    Alex
    [ May 30, 2005: Message edited by: Alex Turcot ]
    Frans Janssen
    Ranch Hand

    Joined: Dec 29, 2004
    Posts: 357
    Hi Darya,

    I have commented all methods (I think co-developers would also like to know what the private methods do), all classes and all non-private fields and variables.
    For each method I provided comment on all parameters, the return value and possible exceptions.

    Frans.


    SCJP 1.4, SCJD
    Darya Akbari
    Ranch Hand

    Joined: Aug 21, 2004
    Posts: 1855
    Did you provide also the private javadoc comments in your HTML output ?

    Regards,
    Darya
    Frans Janssen
    Ranch Hand

    Joined: Dec 29, 2004
    Posts: 357
    Did you provide also the private javadoc comments in your HTML output ?

    No, I didn't. I used the -package flag for generating the html files.

    Frans.
     
    Consider Paul's rocket mass heater.
     
    subject: B&S: What types do you comment with javadoc?