简体   繁体   中英

Is there a way to convert all comments into javadoc comments? [Eclipse/Java]

I'm doing a Java school assignment with Eclipse, and at the very bottom it says all documentation should be in Javadoc, but I already did all my comments using // .

Is there any easier way to do this other than manually going back and changing every comment to Javadoc format /** */ ?

Thanks.

Javadocs are a specific comment format used to generate external documentation for your code. You shouldn't be converting regular comments to Javadoc.

For example:

/**
 * Do foo with a.
 * @param a the a value
 * @return some different value
 * @see #bar
 */
public String foo(String a) {
    // blah blah blah
}

See this technical doc for more details.

If you do want to convert the comments, though, you would have to do it manually like you said. There isn't a specific tool for this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM