Examples of SubTypesScanner


Examples of org.reflections.scanners.SubTypesScanner

    Collection<URL> urls = ClasspathHelper.forPackage("play.utils.meta.convert", classloaders);
    if (log.isDebugEnabled())
      log.debug("urls : " + urls);

    Configuration configs = new ConfigurationBuilder().setUrls(
        urls).addClassLoaders(classloaders).setScanners(new SubTypesScanner(false));
   
    final Reflections reflections = new Reflections(configs);

    Map<Class<?>, Converter<?>> map = Maps.newHashMap();
    Set<Class<? extends Converter>> converterClasses = reflections.getSubTypesOf(Converter.class);
View Full Code Here

Examples of org.reflections.scanners.SubTypesScanner

  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private <C extends CRUD> Map<Class<?>, ControllerProxy<?, ?>> scanRest(GlobalSettings global, Class<C> superType, ClassLoader... cls) {
    final Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(
        ClasspathHelper.forPackage("", cls)).setScanners(new SubTypesScanner(),
        new TypeAnnotationsScanner()).addClassLoaders(cls));

    Map<Class<?>, ControllerProxy<?, ?>> map = Maps.newHashMap();
    Set<Class<? extends C>> controllerClasses = reflections.getSubTypesOf(superType);
    for (Class<? extends C> controllerClass : controllerClasses) {
View Full Code Here

Examples of org.reflections.scanners.SubTypesScanner

  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private <C extends CRUD> Map<Class<?>, ControllerProxyCRUD<?, ?>> scanCrud(GlobalSettings global, Class<C> superType, ClassLoader... cls) {
    final Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(
        ClasspathHelper.forPackage("", cls)).setScanners(new SubTypesScanner(),
        new TypeAnnotationsScanner()).addClassLoaders(cls));

    Map<Class<?>, ControllerProxyCRUD<?, ?>> map = Maps.newHashMap();
    Set<Class<? extends C>> controllerClasses = reflections.getSubTypesOf(superType);
    for (Class<? extends C> controllerClass : controllerClasses) {
View Full Code Here

Examples of org.reflections.scanners.SubTypesScanner

      } catch (Exception ex) {
        // ignore
      }
      Configuration config = new ConfigurationBuilder()
        .setUrls(ClasspathHelper.forManifest(ClasspathHelper.forJavaClassPath()))
        .setScanners(new TypeAnnotationsScanner(), new FieldAnnotationsScanner(), new SubTypesScanner(false))
        .filterInputsBy(FilterBuilder.parse(AnnotationReflector.DEFAULT_ANNOTATION_REFLECTOR_FILTER))
        .addClassLoaders(loaders)
        .useParallelExecutor();
      AnnotationReflector.initDefaultReflector(new AnnotationReflector(config));
      AnnotationReflector reflector = AnnotationReflector.getDefaultReflector();
View Full Code Here

Examples of org.reflections.scanners.SubTypesScanner

    /*lazy*/ private Serializer serializer;
    @Nullable private ExecutorService executorService;
    @Nullable private ClassLoader[] classLoaders;

    public ConfigurationBuilder() {
        scanners = Sets.<Scanner>newHashSet(new TypeAnnotationsScanner(), new SubTypesScanner());
        urls = Sets.newHashSet();
    }
View Full Code Here

Examples of org.reflections.scanners.SubTypesScanner

                Constants.DISCONF_PACK_NAME).includePackage(packName);

        //
        Reflections reflections = new Reflections(new ConfigurationBuilder()
                .filterInputsBy(filter)
                .setScanners(new SubTypesScanner().filterResultsBy(filter),
                        new TypeAnnotationsScanner().filterResultsBy(filter),
                        new FieldAnnotationsScanner().filterResultsBy(filter),
                        new MethodAnnotationsScanner().filterResultsBy(filter),
                        new MethodParameterScanner())
                .setUrls(ClasspathHelper.forPackage(packName)));
View Full Code Here

Examples of org.reflections.scanners.SubTypesScanner

      config.setUrls(ClasspathHelper.forPackage(prefix));
    } else {
      config.setUrls(ClasspathHelper.forJavaClassPath());
    }
   
    return config.setScanners(new SubTypesScanner());
  }
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.