Is there an annotation or other way to include a non-exclusive statement error warning in the error message? I want a particular method or class to throw an error if not all values ββwere correctly processed in the switch.
Example:
public enum E { A, B }
and somewhere else in the code there is a switch on this listing, like so
switch (enumValue) { case A: break; }
Java will give you a warning that this switch does not process all enumeration values. I want to turn this warning into an error (constantly, regardless of the individual IDE settings).
Please keep in mind that I cannot change the original enum
in this case, so I want the compiler to execute it.
source share