@Test public void testFindClassLocation() throws URISyntaxException, IOException { ClassPathEntry firestore65 = classPathEntryOfResource("testdata/google-cloud-firestore-0.65.0-beta.jar"); ClassPathEntry firestore66 = classPathEntryOfResource("testdata/google-cloud-firestore-0.66.0-beta.jar"); String grpcClass = "com.google.cloud.firestore.spi.v1beta1.GrpcFirestoreRpc"; ClassPathEntry pathWith65First = ClassDumper.create(ImmutableList.of(firestore65, firestore66)).findClassLocation(grpcClass); Assert.assertEquals(firestore65, pathWith65First); ClassPathEntry pathWith66First = ClassDumper.create(ImmutableList.of(firestore66, firestore65)).findClassLocation(grpcClass); Assert.assertEquals(firestore66, pathWith66First); }
@Nullable ClassPathEntry findClassLocation(String className) { String filename = classRepository.getFileName(className); return fileNameToClassPathEntry.get(filename); }
ClassDumper { @Nullable ClassPathEntry findClassLocation(String className) { String filename = classRepository.getFileName(className); return fileNameToClassPathEntry.get(filename); } }
ClassDumper { @Nullable ClassPathEntry findClassLocation(String className) { String filename = classRepository.getFileName(className); return fileNameToClassPathEntry.get(filename); } private  ClassDumper(
      List<ClassPathEntry> inputClassPath,
      ClassLoader extensionClassLoader,
      Map<String, ClassPathEntry> fileNameToClassPathEntry); }
ClassDumper { @Nullable ClassPathEntry findClassLocation(String className) { String filename = classRepository.getFileName(className); return fileNameToClassPathEntry.get(filename); } private  ClassDumper(
      List<ClassPathEntry> inputClassPath,
      ClassLoader extensionClassLoader,
      Map<String, ClassPathEntry> fileNameToClassPathEntry);  }
ClassDumper { @Nullable ClassPathEntry findClassLocation(String className) { String filename = classRepository.getFileName(className); return fileNameToClassPathEntry.get(filename); } private  ClassDumper(
      List<ClassPathEntry> inputClassPath,
      ClassLoader extensionClassLoader,
      Map<String, ClassPathEntry> fileNameToClassPathEntry);   }