From a38d06c2c0c2ed168d4a3c86316399ae6fca914c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 5 Oct 2018 07:50:47 +0100 Subject: [PATCH] Rename class DefaultPackageScanner as ClassGraphPackageScanner The DefaultPackageScanner is implemented by using ClassGraph, so renaming the class to better reflect this. Also added a link to the ClassGraph github page. --- ...ltPackageScanner.java => ClassGraphPackageScanner.java} | 6 ++++-- ...eScannerTest.java => ClassGraphPackageScannerTest.java} | 7 +++---- 2 files changed, 7 insertions(+), 6 deletions(-) rename builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/{DefaultPackageScanner.java => ClassGraphPackageScanner.java} (90%) rename builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/{DefaultPackageScannerTest.java => ClassGraphPackageScannerTest.java} (83%) diff --git a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/ClassGraphPackageScanner.java similarity index 90% rename from builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java rename to builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/ClassGraphPackageScanner.java index 232b08e..e014e85 100644 --- a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScanner.java +++ b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/ClassGraphPackageScanner.java @@ -28,12 +28,14 @@ import java.util.List; import java.util.stream.Collectors; /** - * Default implementation of {@link PackageScanner}. + * Implementation of {@link PackageScanner} using ClassGraph. + * + * @see ClassGraph * * @author Paul Campbell (pcampbell@kemitix.net). */ @Service -public class DefaultPackageScanner implements PackageScanner { +public class ClassGraphPackageScanner implements PackageScanner { @Override public final List apply(final RuleSource ruleSource) { diff --git a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScannerTest.java b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ClassGraphPackageScannerTest.java similarity index 83% rename from builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScannerTest.java rename to builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ClassGraphPackageScannerTest.java index 7b5a02e..c7ff4d8 100644 --- a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/DefaultPackageScannerTest.java +++ b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/ClassGraphPackageScannerTest.java @@ -3,18 +3,17 @@ package net.kemitix.checkstyle.ruleset.builder; import org.junit.Test; import java.util.List; -import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; /** - * Tests for {@link DefaultPackageScanner}. + * Tests for {@link ClassGraphPackageScanner}. * * @author Paul Campbell (pcampbell@kemitix.net) */ -public class DefaultPackageScannerTest { +public class ClassGraphPackageScannerTest { - private PackageScanner scanner = new DefaultPackageScanner(); + private PackageScanner scanner = new ClassGraphPackageScanner(); @Test public void canScanCheckstylePackage() {