private void filenameScan() { candidateClassFiles.visit(new ClassFileVisitor() { public void visitClassFile(FileVisitDetails fileDetails) { String className = fileDetails.getRelativePath().getPathString().replaceAll("\\.class", "").replace('/', '.'); TestClassRunInfo testClass = new DefaultTestClassRunInfo(className); testClassProcessor.processTestClass(testClass); } }); }
/** * In none super class mode a test class is published when the class is a test and it is not abstract. In super class mode it must not publish the class otherwise it will get published multiple * times (for each extending class). */ protected void publishTestClass(boolean isTest, TestClassVisitor classVisitor, boolean superClass) { if (isTest && !classVisitor.isAbstract() && !superClass) { String className = Type.getObjectType(classVisitor.getClassName()).getClassName(); testClassProcessor.processTestClass(new DefaultTestClassRunInfo(className)); } }
@Override public void run() { this.candidateClassFiles.visit(new ClassFileVisitor() { @Override public void visitClassFile(FileVisitDetails fileDetails) { String className = fileDetails.getRelativePath().getPathString().replaceAll("\\.class", "").replace('/', '.'); TestClassRunInfo testClass = new DefaultTestClassRunInfo(className); EclipsePluginTestClassScanner.this.testClassProcessor.processTestClass(testClass); } }); }