I am using the Reflections
library (see info) to get all classes within a package. I am just using the following code:
public static void build() {
System.out.println("Start reflection");
Reflections reflections = new Reflections("org.octocash.client.support.cache");
System.out.println("Done with constructor");
Set<Class<?>> dataClasses = reflections.getSubTypesOf(Object.class)
.stream().filter(c -> !c.getClass().equals(Data.class))
.collect(Collectors.toSet());
data.addAll(dataClasses);
}
The problem is that it only prints "Start reflection"
in the console, so it is unable to run the constructor. If I surround the code with a try-catch block, it is not printing an Exception
either.
I am using the uberjar from Reflections
(not using Maven), so maybe it has something to do with this.
What could be happening here? I am totally in the dark on how to debug this..
Any help is greatly appreciated!