public static void register(KieContainer kieContainer) { // TODO Support having multiple KieContainers on the classpath (maybe through ClassLoader to KieContainer mapping?) Vfs.addDefaultURLTypes(new ReflectionsKieVfsUrlType(kieContainer)); }
private static void addDefaultUrlTypes() { if (!added.getAndSet(true)) { Vfs.addDefaultURLTypes(new VfsUrlType()); } } }
public static void init() { Vfs.addDefaultURLTypes(new JnilibIgnoringUrlType()); } }
Vfs.addDefaultURLTypes(getInstance());
private Reflections createReflections() { Vfs.addDefaultURLTypes(new Vfs.UrlType() { @Override public boolean matches(URL url) throws Exception { return "file".equals(url.getProtocol()); } @Override public Vfs.Dir createDir(URL url) throws Exception { File file = Vfs.getFile(url); return file.isDirectory() ? new SystemDir(file) : new ZipDir(new JarFile(Vfs.getFile(url))); } }); Configuration config = new ConfigurationBuilder() .setScanners(new MethodAnnotationsScanner(), new SubTypesScanner()) .addUrls(ClasspathHelper.getUrls()) .filterInputsBy(this::shouldScan); return new Reflections(config); }
private Reflections createReflections() { Vfs.addDefaultURLTypes(new Vfs.UrlType() { @Override public boolean matches(URL url) throws Exception { return "file".equals(url.getProtocol()); } @Override public Vfs.Dir createDir(URL url) throws Exception { File file = Vfs.getFile(url); return file.isDirectory() ? new SystemDir(file) : new ZipDir(new JarFile(Vfs.getFile(url))); } }); Configuration config = new ConfigurationBuilder() .setScanners(new MethodAnnotationsScanner(), new SubTypesScanner()) .addUrls(ClasspathHelper.getUrls()) .filterInputsBy(this::shouldScan); return new Reflections(config); }