39 new SyntheticClasses().run(); |
39 new SyntheticClasses().run(); |
40 } |
40 } |
41 |
41 |
42 private void run() throws IOException, ConstantPoolException { |
42 private void run() throws IOException, ConstantPoolException { |
43 File testClasses = new File(System.getProperty("test.classes")); |
43 File testClasses = new File(System.getProperty("test.classes")); |
44 for (File classFile : testClasses.listFiles()) { |
44 for (File classFile : testClasses.listFiles(f -> f.getName().endsWith(".class"))) { |
45 ClassFile cf = ClassFile.read(classFile); |
45 ClassFile cf = ClassFile.read(classFile); |
46 if (cf.getName().matches(".*\\$[0-9]+")) { |
46 if (cf.getName().matches(".*\\$[0-9]+")) { |
47 EnclosingMethod_attribute encl = |
47 EnclosingMethod_attribute encl = |
48 (EnclosingMethod_attribute) cf.getAttribute(Attribute.EnclosingMethod); |
48 (EnclosingMethod_attribute) cf.getAttribute(Attribute.EnclosingMethod); |
49 if (encl != null) { |
49 if (encl != null) { |