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.
This commit is contained in:
parent
27901b97d7
commit
a38d06c2c0
2 changed files with 7 additions and 6 deletions
|
@ -28,12 +28,14 @@ import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link PackageScanner}.
|
* Implementation of {@link PackageScanner} using ClassGraph.
|
||||||
|
*
|
||||||
|
* @see <a href="https://github.com/classgraph/classgraph/">ClassGraph</a>
|
||||||
*
|
*
|
||||||
* @author Paul Campbell (pcampbell@kemitix.net).
|
* @author Paul Campbell (pcampbell@kemitix.net).
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class DefaultPackageScanner implements PackageScanner {
|
public class ClassGraphPackageScanner implements PackageScanner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final List<String> apply(final RuleSource ruleSource) {
|
public final List<String> apply(final RuleSource ruleSource) {
|
|
@ -3,18 +3,17 @@ package net.kemitix.checkstyle.ruleset.builder;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for {@link DefaultPackageScanner}.
|
* Tests for {@link ClassGraphPackageScanner}.
|
||||||
*
|
*
|
||||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||||
*/
|
*/
|
||||||
public class DefaultPackageScannerTest {
|
public class ClassGraphPackageScannerTest {
|
||||||
|
|
||||||
private PackageScanner scanner = new DefaultPackageScanner();
|
private PackageScanner scanner = new ClassGraphPackageScanner();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void canScanCheckstylePackage() {
|
public void canScanCheckstylePackage() {
|
Loading…
Reference in a new issue