
ch.dkitc.ridioc.DIReflectionsCache Maven / Gradle / Ivy
package ch.dkitc.ridioc;
import org.reflections.Reflections;
import java.net.URL;
import java.util.Set;
public class DIReflectionsCache {
private final String packagePrefix;
private Reflections reflections;
public DIReflectionsCache(String packagePrefix) {
this.packagePrefix = packagePrefix;
}
public Set> getSubTypesOf(Class type) {
return getReflections().getSubTypesOf(type);
}
public Set getUrls() {
return getReflections().getConfiguration().getUrls();
}
private Reflections getReflections() {
if (reflections == null) {
reflections = new Reflections(packagePrefix);
}
return reflections;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy