@Test void JDK11でコンパイルされたクラス() throws IOException { Path path = Paths.get(TestSupport.resourceRootURI()).resolve("jdk11").resolve("CompiledJdk11NestingClass.class"); AsmFactReader sut = new AsmFactReader(); sut.typeByteCode(TestSupport.newClassSource(path)); }
TypeFact typeByteCode(ClassSource classSource) { AsmClassVisitor asmClassVisitor = new AsmClassVisitor(); ClassReader classReader = new ClassReader(classSource.value()); classReader.accept(asmClassVisitor, ClassReader.SKIP_DEBUG); return asmClassVisitor.typeFact; }
AsmFactReader implements FactReader { TypeFact typeByteCode(ClassSource classSource) { AsmClassVisitor asmClassVisitor = new AsmClassVisitor(); ClassReader classReader = new ClassReader(classSource.value()); classReader.accept(asmClassVisitor, ClassReader.SKIP_DEBUG); return asmClassVisitor.typeFact; } }
AsmFactReader implements FactReader { TypeFact typeByteCode(ClassSource classSource) { AsmClassVisitor asmClassVisitor = new AsmClassVisitor(); ClassReader classReader = new ClassReader(classSource.value()); classReader.accept(asmClassVisitor, ClassReader.SKIP_DEBUG); return asmClassVisitor.typeFact; }  }
AsmFactReader implements FactReader { TypeFact typeByteCode(ClassSource classSource) { AsmClassVisitor asmClassVisitor = new AsmClassVisitor(); ClassReader classReader = new ClassReader(classSource.value()); classReader.accept(asmClassVisitor, ClassReader.SKIP_DEBUG); return asmClassVisitor.typeFact; }  @Override TypeFacts readTypeFacts(ClassSources classSources); }
AsmFactReader implements FactReader { TypeFact typeByteCode(ClassSource classSource) { AsmClassVisitor asmClassVisitor = new AsmClassVisitor(); ClassReader classReader = new ClassReader(classSource.value()); classReader.accept(asmClassVisitor, ClassReader.SKIP_DEBUG); return asmClassVisitor.typeFact; }  @Override TypeFacts readTypeFacts(ClassSources classSources);  }