Examples of MethodAnnotationsScanner


Examples of org.reflections.scanners.MethodAnnotationsScanner

        ConfigurationBuilder builder = new ConfigurationBuilder();
       
        Set<URL> packagesToScan = getPackagesToScanForRoutes(ninjaProperties);
        builder.addUrls(packagesToScan);
       
        builder.addScanners(new MethodAnnotationsScanner());
        Reflections reflections = new Reflections(builder);

        Set<Method> methods = reflections.getMethodsAnnotatedWith(Route.class);

        logger.info("Generating {} routes.", methods.size());
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

      if (d.getPackagesToScan() != null) {
        for (String pack : d.getPackagesToScan()) {
          Reflections reflections = new Reflections(
              new ConfigurationBuilder()
                  .setUrls(ClasspathHelper.forPackage(pack))
                  .setScanners(new MethodAnnotationsScanner()));

          Set<Method> annotated = reflections
              .getMethodsAnnotatedWith(Documentation.class);

          Iterator<Method> it = annotated.iterator();
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

    private ServiceLoaderImpl() {
        Predicate<String> filter = new FilterBuilder().include(FilterBuilder.prefix("configuration"));

        reflections = new Reflections(new ConfigurationBuilder().filterInputsBy(filter)
                .setUrls(ClasspathHelper.forPackage("configuration"))
                .setScanners(new TypeAnnotationsScanner(), new MethodAnnotationsScanner(), new TypesScanner()));

    }
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

            // Check if there are complements via annotations
            if (d.getPackagesToScan() != null) {
                for (String pack : d.getPackagesToScan()) {
                    Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(
                        ClasspathHelper.forPackage(pack)).setScanners(new MethodAnnotationsScanner()));

                    Set<Method> annotated = reflections.getMethodsAnnotatedWith(Documentation.class);

                    Iterator<Method> it = annotated.iterator();
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

        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)));

        return reflections;
    }
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

            // Check if there are complements via annotations
            if (d.getPackagesToScan() != null) {
                for (String pack : d.getPackagesToScan()) {
                    Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(
                        ClasspathHelper.forPackage(pack)).setScanners(new MethodAnnotationsScanner()));

                    Set<Method> annotated = reflections.getMethodsAnnotatedWith(Documentation.class);

                    Iterator<Method> it = annotated.iterator();
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

            // Check if there are complements via annotations
            if (d.getPackagesToScan() != null) {
                for (String pack : d.getPackagesToScan()) {
                    Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(
                        ClasspathHelper.forPackage(pack)).setScanners(new MethodAnnotationsScanner()));

                    Set<Method> annotated = reflections.getMethodsAnnotatedWith(Documentation.class);

                    Iterator<Method> it = annotated.iterator();
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

    }
    if (isScanFieldAnnotations()) {
      config[scanners++] = new FieldAnnotationsScanner();
    }
    if (isScanMethodAnnotations()) {
      config[scanners++] = new MethodAnnotationsScanner();
    }
    if (isScanParameterAnnotations()) {
      config[scanners++] = new MethodParameterScanner();
    }
    config[scanners++] = ClasspathScanner.class.getClassLoader();
View Full Code Here

Examples of org.reflections.scanners.MethodAnnotationsScanner

        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)));

        return reflections;
    }
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.