I have written a lot of comments inside my business logic like that:
/**
* Do some important stuff.
* @param pDog
* @param pAllDogTraining
* @return
*/
@Overwrite
public Map<DogId, Dog> doEvaluateAllDog(final Dog pDog, final Collection<DogTraining> pAllDogTraining) {
final Map<DogId, Dog> lAllDogBad = new HashMap<DogId, Dog>();
final List<DogTraining> lAllDogTraining = new ArrayList<DogTraining>(pAllDogTraining);
/**
* Remove deleted entries.
* Detailed description
*/
removeDeletetTrainings(lAllDogTraining);
/**
* Set the priority for each training
* - bad dogs
* - nice dogs
* - unknown dogs
* Detailed description
*/
Collections.sort(lAllDogTraining, new DogTrainingComparator());
// Iterate over training elements and set the conflict state
for(.....
My question is, does the javadoc
tool recognize the doc comments inside my method blocks too? In the near future we will offer a technical documentation and the JavaDoc of our project will be part of it.
Writing Javadoc Comments In general, Javadoc comments are any multi-line comments (" /** ... */ ") that are placed before class, field, or method declarations. They must begin with a slash and two stars, and they can include special tags to describe characteristics like method parameters or return values.
Javadoc is a tool for generating API documentation in HTML format from doc comments in source code. It can be downloaded only as part of the Java 2 SDK. To see documentation generated by the Javadoc tool, go to J2SE 1.5. 0 API Documentation.
What is Javadoc? Javadoc is a tool which comes with JDK and it is used for generating Java code documentation in HTML format from Java source code, which requires documentation in a predefined format. Following is a simple example where the lines inside /*…. */ are Java multi-line comments.
Nope, you shouldn't write javadoc for private methods. End users don't have access to private fields or methods so there really isn't a point in providing javadoc for them. Private fields and methods are only meant for the developer. If you really need to though, feel free to write comments for non-obvious logic.
does the
javadoc
tool recognize the doc comments inside my method blocks too?
No.
A JavaDoc comment is a multi-line comment starting with /**
that immediately precedes a class declaration or a method or attribute of the class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With