When annotation is used as the super interface, the value of Java – @ suppresswarnings
•
Java
I have an enumeration that implements annotations, and I get a warning:
Does @ suppresswarnings that handle this warning have a value? I don't want to use @ suppresswarnings ("all"), I'd rather give warnings than suppress them
I'm using eclipse
Solution
I believe @ suppresswarnings has no such value If there is such a value, the compiler will give you a prompt, use it and warning
Since it does not exist, this may mean that it is not a good idea to annotate enumeration extensions
If you still want to do this, I think @ suppresswarnings ("all") is your only choice
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
二维码