DefaultJavaResourceLocator implements JavaResourceLocator { @Override public Collection<File> classFilesToAnalyze() { ImmutableList.Builder<File> result = ImmutableList.builder(); for (String key : classKeys()) { String filePath = key + ".class"; for (File binaryDir : javaClasspath.getBinaryDirs()) { File classFile = new File(binaryDir, filePath); if (classFile.isFile()) { result.add(classFile); break; } } } return result.build(); } DefaultJavaResourceLocator(JavaClasspath javaClasspath); @Override InputFile findResourceByClassName(String className); @Override Collection<File> classFilesToAnalyze(); @Override Collection<File> classpath(); @Override void scanFile(JavaFileScannerContext context);  }
@Test void classFilesToAnalyze() throws Exception { assertThat(javaResourceLocator.classFilesToAnalyze()).hasSize(5); }