Java – Eclipse’s $fall-through $annotation standard?

I use eclipse, so I use / / $fall - through $annotation, which is a common practice in switch statements and so on But my colleagues use NetBeans and question what I'm doing with these And trying anything with Google's symbol is like trying to pull teeth with a pair of frozen gloves, no tools

Is it using / / $fall-through $annotations, dollar symbols and all, a standard Java thing, or some kind of eclipse magic? If I load the same code in NetBeans or another IDE, or run the code through a separate java compiler, the switch statement will still be marked with a warning even if this comment is used Is there a standard way to do this, in addition to using the @ suppresswarning annotation (which will simply confuse the code for how you use it)?

Solution

Things like this rely on ide / style checking tools There are no standard Java comments

(then JavaDocs are standard, but they do not control compilation / error reporting.)

The explanation of the $fall-through $structure mentioned in the eclipse release documentation:

Note that the warning name of the @ suppresswarnings annotation depends on the compiler, not the Java language standard

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>