Package org.reflections.util

Examples of org.reflections.util.ConfigurationBuilder.filterInputsBy()


    for (String basePkg : basePackages) {
      cfgBldr.addUrls(ClasspathHelper.forPackage(basePkg));
      filterBuilder.include(FilterBuilder.prefix(basePkg));
    }

    cfgBldr.filterInputsBy(filterBuilder).setScanners(
        new SubTypesScanner(), new TypeAnnotationsScanner());
    this.reflections = new Reflections(cfgBldr);
  }

  public void run(Environment environment, Injector injector) {
View Full Code Here


        final Set<URL> s = new HashSet<URL>();
        s.addAll(ClasspathHelper.forJavaClassPath());
        s.addAll(Arrays.asList(ClasspathUrlFinder.findClassPaths()));
        conf.setUrls(new ArrayList(s));

        conf.filterInputsBy(predicate);

        final Reflections r = new Reflections(conf);

        final Set<Class<?>> entities = r.getTypesAnnotatedWith(Entity.class);
        for (final Class<?> c : entities) {
View Full Code Here

    for (String basePkg : basePackages) {
      cfgBldr.addUrls(ClasspathHelper.forPackage(basePkg));
      filterBuilder.include(FilterBuilder.prefix(basePkg));
    }

    cfgBldr.filterInputsBy(filterBuilder).setScanners(
        new SubTypesScanner(), new TypeAnnotationsScanner());
    this.reflections = new Reflections(cfgBldr);
  }

  public void run(Environment environment, Injector injector) {
View Full Code Here

  private static Configuration getConfig(String prefix) {
   
    ConfigurationBuilder config = new ConfigurationBuilder();
   
    if (prefix != null) {
      config.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(prefix )));
      config.setUrls(ClasspathHelper.forPackage(prefix));
    } else {
      config.setUrls(ClasspathHelper.forJavaClassPath());
    }
   
View Full Code Here

        iterator.remove();
      }
    }
    conf.setUrls(new ArrayList<URL>(s));

    conf.filterInputsBy(localPredicate);

    final Reflections r = new Reflections(conf);

    final Set<Class<?>> entities = r.getTypesAnnotatedWith(Entity.class);
    for (final Class<?> c : entities) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.