test/tools/javac/diags/CheckResourceKeys.java

Print this page




 292             "ct.sym",
 293             "rt.jar",
 294             "jfxrt.jar",
 295             "module-info.class",
 296             "jrt-fs.jar",
 297             // -XD option names
 298             "process.packages",
 299             "ignore.symbol.file",
 300             "fileManager.deferClose",
 301             // prefix/embedded strings
 302             "compiler.",
 303             "compiler.misc.",
 304             "opt.Xlint.desc.",
 305             "count.",
 306             "illegal.",
 307             "java.",
 308             "javac.",
 309             "verbose.",
 310             "locn.",
 311             // annotation for minimal value types.
 312             "jvm.internal.value.DeriveValueType",
 313             "java.lang.__Value"
 314     ));
 315 
 316     /**
 317      * Look for a resource that ends in this string fragment.
 318      */
 319     boolean hasMatch(Set<String> resourceKeys, String s) {
 320         for (String rk: resourceKeys) {
 321             if (rk.endsWith(s))
 322                 return true;
 323         }
 324         return false;
 325     }
 326 
 327     /**
 328      * Get the set of strings from (most of) the javac classfiles.
 329      */
 330     Set<String> getCodeStrings() throws IOException {
 331         Set<String> results = new TreeSet<String>();
 332         JavaCompiler c = ToolProvider.getSystemJavaCompiler();




 292             "ct.sym",
 293             "rt.jar",
 294             "jfxrt.jar",
 295             "module-info.class",
 296             "jrt-fs.jar",
 297             // -XD option names
 298             "process.packages",
 299             "ignore.symbol.file",
 300             "fileManager.deferClose",
 301             // prefix/embedded strings
 302             "compiler.",
 303             "compiler.misc.",
 304             "opt.Xlint.desc.",
 305             "count.",
 306             "illegal.",
 307             "java.",
 308             "javac.",
 309             "verbose.",
 310             "locn.",
 311             // annotation for minimal value types.
 312             "jvm.internal.value.ValueCapableClass",
 313             "java.lang.__Value"
 314     ));
 315 
 316     /**
 317      * Look for a resource that ends in this string fragment.
 318      */
 319     boolean hasMatch(Set<String> resourceKeys, String s) {
 320         for (String rk: resourceKeys) {
 321             if (rk.endsWith(s))
 322                 return true;
 323         }
 324         return false;
 325     }
 326 
 327     /**
 328      * Get the set of strings from (most of) the javac classfiles.
 329      */
 330     Set<String> getCodeStrings() throws IOException {
 331         Set<String> results = new TreeSet<String>();
 332         JavaCompiler c = ToolProvider.getSystemJavaCompiler();