/** * <p> * Given a resource path, eg foo/Foo.class, return the class name, eg foo.Foo * * <p> * This method is able to handle different operating systems (Unix/Windows) and whether * the resource is in a folder or inside a jar file ('/' separator independent of operating system). * */ public static String getClassNameFromResourcePath(String resource){ //method had to be moved due to constraints on "runtime" module dependencies return InitializingListenerUtils.getClassNameFromResourcePath(resource); }
List<String> list = InitializingListenerUtils.scanClassesToInit(dir);
list = classesToInitFromScaffoldingFile(); } else { list = InitializingListenerUtils.scanClassesToInit(new File(compiledTestsFolder));
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if(file.toString().endsWith("scaffolding.class")){ String resource = file.toFile().getAbsolutePath() .substring(dir.getAbsolutePath().length() + 1 , file.toFile().getAbsolutePath().length()); String className = getClassNameFromResourcePath(resource); list.add(className); } return FileVisitResult.CONTINUE; } });