Package org.reflections.scanners

Examples of org.reflections.scanners.TypeAnnotationsScanner


            .setUrls(urls)
                    //.filterInputsBy(new FilterBuilder().exclude(CLIENT_PKG_REGEX))
            .setScanners(
                    new FieldAnnotationsScanner(),
                    new MethodAnnotationsScanner(),
                    new TypeAnnotationsScanner(),
                    //new SubTypesScanner(),
                    propScanner
            );
  }
View Full Code Here


    return new ConfigurationBuilder()
            .setUrls(urls)
            .setScanners(
                    new FieldAnnotationsScanner(),
                    new MethodAnnotationsScanner(),
                    new TypeAnnotationsScanner() {
                      @Override
                      public void scan(Object cls) {
                        @SuppressWarnings("unchecked")
                        final String className = getMetadataAdapter().getClassName(cls);
View Full Code Here

            URL url = cpFile.toURL();
            urls.add(url);
        }

        ConfigurationBuilder configurationBuilder = new ConfigurationBuilder().setUrls(urls);
        configurationBuilder.setScanners(new SubTypesScanner(), new TypeAnnotationsScanner());

        ReflectionsExt refl = new ReflectionsExt(configurationBuilder);

        Collection<Class<?>> allClasses = Sets.newHashSet();
        addAnnotatedClasses(ResourceDependencies.class, refl, allClasses);
View Full Code Here

            URL url = cpFile.toURL();
            urls.add(url);
        }

        ConfigurationBuilder configurationBuilder = new ConfigurationBuilder().setUrls(urls);
        configurationBuilder.setScanners(new SubTypesScanner(), new TypeAnnotationsScanner(), new MarkerResourcesScanner());

        ReflectionsExt refl = new ReflectionsExt(configurationBuilder);
        Collection<Class<?>> allClasses = Sets.newHashSet();

        addAnnotatedClasses(DynamicUserResource.class, refl, allClasses);
View Full Code Here

        //
        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

    @Test
    public void uniqueRootElementTest() throws Exception {
        Reflections reflections = new Reflections(
                ClasspathHelper.forPackage("org.kie.services"),
                new TypeAnnotationsScanner(), new FieldAnnotationsScanner(), new MethodAnnotationsScanner());
        Set<String> idSet = new HashSet<String>();
        Map<String, Class> idClassMap = new HashMap<String, Class>();
        for (Class<?> jaxbClass : reflections.getTypesAnnotatedWith(XmlRootElement.class)) {
            if( ! jaxbClass.getPackage().getName().startsWith("org.kie") ) {
                continue;
View Full Code Here

    @Test
    public void processInstanceIdFieldInCommands() throws Exception {
        Reflections cmdReflections = new Reflections(
                ClasspathHelper.forPackage("org.drools.command.*"),
                new TypeAnnotationsScanner(), new FieldAnnotationsScanner(), new MethodAnnotationsScanner(), new SubTypesScanner());

        Set<Class<?>> classes = cmdReflections.getTypesAnnotatedWith(XmlRootElement.class);
        Set<Class> cmdClasses = new HashSet<Class>();
        for (Class<?> jaxbClass : classes ) {
            if( jaxbClass.getSimpleName().endsWith("Command") ) {
View Full Code Here

                .setUrls(urls)
                        //.filterInputsBy(new FilterBuilder().exclude(CLIENT_PKG_REGEX))
                .setScanners(
                        //new FieldAnnotationsScanner(),
                        //new MethodAnnotationsScanner(),
                        new TypeAnnotationsScanner(),
                        //new SubTypesScanner(),
                        propScanner
                );

        store = new Store();
View Full Code Here

      cfgBldr.addUrls(ClasspathHelper.forPackage(basePkg));
      filterBuilder.include(FilterBuilder.prefix(basePkg));
    }

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

        if (predicate == null) {
            predicate = Predicates.alwaysTrue();
        }
        Assert.parametersNotNull("m, predicate", m, predicate);
        final ConfigurationBuilder conf = new ConfigurationBuilder();
        conf.setScanners(new TypesScanner(), new TypeAnnotationsScanner());

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

TOP

Related Classes of org.reflections.scanners.TypeAnnotationsScanner

Copyright © 2018 www.massapicom. 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.