Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

java - Does "/* (non-javadoc)" have a well-understood meaning?

Does /* (non-javadoc) have a meaning, beyond pointing out to the reader of source code that a comment block is intentionally not a Javadoc comment? Lately I've seen a lot of code that looks like this:

/*
 * (non-javadoc)
 *
 * This method converts widgets to gizmos
 */
public Foo bar() {
   ...

Is this an established convention of some kind? If so, what does it mean (beyond the obvious literal meaning) and when is it used?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

According to the info I could find, this was to fix a bug in older versions of the JavaDoc tool (or more likely older version of Eclipse's processing of JavaDoc comments) that would not display the correct documentation for a method that overrides the method of a parent class.

As noted by Konstantin, Eclipse's override template includes this text.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...