src/share/classes/com/sun/tools/javac/code/Lint.java

Print this page




 205          * Warn about issues relating to use of statics
 206          */
 207         STATIC("static"),
 208 
 209         /**
 210          * Warn about proprietary API that may be removed in a future release.
 211          */
 212         SUNAPI("sunapi", true),
 213 
 214         /**
 215          * Warn about issues relating to use of try blocks (i.e. try-with-resources)
 216          */
 217         TRY("try"),
 218 
 219         /**
 220          * Warn about unchecked operations on raw types.
 221          */
 222         UNCHECKED("unchecked"),
 223 
 224         /**
 225          * Warn about potentially unsafe vararg methods
 226          */
 227         VARARGS("varargs");







 228 
 229         LintCategory(String option) {
 230             this(option, false);
 231         }
 232 
 233         LintCategory(String option, boolean hidden) {
 234             this.option = option;
 235             this.hidden = hidden;
 236             map.put(option, this);
 237         }
 238 
 239         static LintCategory get(String option) {
 240             return map.get(option);
 241         }
 242 
 243         public final String option;
 244         public final boolean hidden;
 245     };
 246 
 247     /**




 205          * Warn about issues relating to use of statics
 206          */
 207         STATIC("static"),
 208 
 209         /**
 210          * Warn about proprietary API that may be removed in a future release.
 211          */
 212         SUNAPI("sunapi", true),
 213 
 214         /**
 215          * Warn about issues relating to use of try blocks (i.e. try-with-resources)
 216          */
 217         TRY("try"),
 218 
 219         /**
 220          * Warn about unchecked operations on raw types.
 221          */
 222         UNCHECKED("unchecked"),
 223 
 224         /**
 225          * Warn about potentially unsafe vararg methods.
 226          */
 227         VARARGS("varargs"),
 228 
 229         /**
 230          * Warn when code refers to a type that is hidden in a source file (ie source file name is
 231          * different from the class name, and the type is not properly nested) and the referring code
 232          * is not located in the same source file.
 233          */
 234         HIDDENCLASS("hiddenclass");
 235 
 236         LintCategory(String option) {
 237             this(option, false);
 238         }
 239 
 240         LintCategory(String option, boolean hidden) {
 241             this.option = option;
 242             this.hidden = hidden;
 243             map.put(option, this);
 244         }
 245 
 246         static LintCategory get(String option) {
 247             return map.get(option);
 248         }
 249 
 250         public final String option;
 251         public final boolean hidden;
 252     };
 253 
 254     /**