use of com.robo4j.core.reflect.ReflectionScan in project robo4j by Robo4J.
the class PersistenceDescriptorFactory method scanForEntities.
private List<String> scanForEntities(ClassLoader loader, String... entityPackages) {
ReflectionScan scan = new ReflectionScan(loader);
List<String> classesNames = processClassesWithAnnotation(loader, scan.scanForEntities(entityPackages));
registeredClasses = classesNames.stream().map(cn -> {
try {
return RoboClassLoader.getInstance().getClassLoader().loadClass(cn);
} catch (ClassNotFoundException e) {
SimpleLoggingUtil.error(getClass(), "failed to load class: ", e);
return null;
}
}).filter(Objects::nonNull).collect(Collectors.toList());
return classesNames;
}
use of com.robo4j.core.reflect.ReflectionScan in project robo4j by Robo4J.
the class HttpCodecRegistry method scan.
public void scan(ClassLoader loader, String... packages) {
ReflectionScan scan = new ReflectionScan(loader);
processClasses(loader, scan.scanForEntities(packages));
}
Aggregations