@Test public void converting_paths_to_class_names() { assertThat(ClassFiles.pathToClassName("Foo.class"), is("Foo")); assertThat(ClassFiles.pathToClassName("com/example/Foo.class"), is("com.example.Foo")); }
public static String pathToClassName(String path) { return path.substring(0, path.lastIndexOf(".class")).replace('/', '.'); }
ClassFiles { public static String pathToClassName(String path) { return path.substring(0, path.lastIndexOf(".class")).replace('/', '.'); } }
ClassFiles { public static String pathToClassName(String path) { return path.substring(0, path.lastIndexOf(".class")).replace('/', '.'); }  }
ClassFiles { public static String pathToClassName(String path) { return path.substring(0, path.lastIndexOf(".class")).replace('/', '.'); }  static String classNameToPath(String className); static String pathToClassName(String path); }
ClassFiles { public static String pathToClassName(String path) { return path.substring(0, path.lastIndexOf(".class")).replace('/', '.'); }  static String classNameToPath(String className); static String pathToClassName(String path);  }