/** * constructs a Reflections instance and scan according to given {@link Configuration} * * <p>it is preferred to use {@link org.jboss.errai.reflections.util.ConfigurationBuilder} */ public Reflections(final Configuration configuration) { this.configuration = configuration; store = new Store(configuration); // inject to scanners for (Scanner scanner : configuration.getScanners()) { scanner.setConfiguration(configuration); scanner.setStore(store.get(scanner)); } }
private void scan(Vfs.File file) { String input = file.getRelativePath(); if (configuration.acceptsInput(input)) { for (Scanner scanner : configuration.getScanners()) { try { if (scanner.acceptsInput(input)) { scanner.scan(file); } } catch (Exception e) { log.warn( "could not scan file " + file.getFullPath() + " with scanner " + scanner.getName(), e); } } } }