Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
  • Loading branch information
yaansz committed Aug 29, 2024
1 parent 213e6c5 commit 7244424
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/com/softawii/curupira/v2/utils/ScanUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public class ScanUtils {

public static Set<Class> getClassesInPackage(String pkg, Class annotation) {
LOGGER.info("Scanning package: {}, annotation: {}", pkg, annotation);

Reflections reflections = new Reflections(new ConfigurationBuilder()
.forPackages(pkg)
.setScanners(Scanners.TypesAnnotated)
.filterInputsBy(input -> input.endsWith(".class")));

Reflections reflections = new Reflections(
new ConfigurationBuilder()
.forPackages(pkg)
.setScanners(Scanners.SubTypes, Scanners.TypesAnnotated)
.filterInputsBy((input) -> input.endsWith(".class") && input.startsWith(pkg.replace('.', '/')))
);
return new HashSet<>(reflections.getTypesAnnotatedWith(annotation));
}

Expand Down

0 comments on commit 7244424

Please sign in to comment.