Package org.reflections

Examples of org.reflections.reflections$TestModel$I3$annotations


      throw new RuntimeException("Error getting JDBC connection", e);
    }
  }

  private static InputStream getInputStreamFromFile(String file) {
    Reflections reflections = new Reflections(new ConfigurationBuilder()
        .addUrls(ClasspathHelper.forPackage("org.pau.assetmanager"))
        .setScanners(new ResourcesScanner()));
    Set<String> resources = reflections.getResources(Pattern.compile(file));
    if (resources.size() > 0) {
      String resourceFound = resources.iterator().next().toString();
      InputStream inputStream = GenericTest.class.getClassLoader()
          .getResourceAsStream(resourceFound);
      return inputStream;
View Full Code Here


  public static void scanClassPathForFormattingAnnotations() {

    ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);

    // scan classpath and filter out classes that don't begin with "com.nds"
    Reflections ndsReflections = new Reflections("com.nds");

    Set<Class<?>> annotated = ndsReflections.getTypesAnnotatedWith(DefaultFormat.class);

        Reflections ciscoReflections = new Reflections("com.cisco");

        annotated.addAll(ciscoReflections.getTypesAnnotatedWith(DefaultFormat.class));

    for (Class<?> markerClass : annotated) {

      // if the marker class is indeed implementing FoundationLoggingMarker
      // interface
View Full Code Here

      }
      if(config.getBasePackages().length > 1) {
        throw new IllegalArgumentException("picoprovider has no support for multiple package scanning");
      }
      String packages = config.getBasePackages()[0];
        this.reflections = new Reflections(packages, new ClassAnnotationsScanner(), new SubTypesScanner());
    }
View Full Code Here

      }

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

          while (it.hasNext()) {
View Full Code Here

   * @return
   */
  private static Set<Class<? extends MZmineModule>> findModulesInPackage(
      String packages) {

    Reflections reflections = new Reflections(packages);

    Set<Class<? extends MZmineModule>> result = new HashSet<Class<? extends MZmineModule>>();

    // builds all our implementation objects
    for (Class<? extends MZmineModule> module : reflections
        .getSubTypesOf(MZmineModule.class)) {
      if (module.isInterface() == false) {
        if (module.isAnonymousClass() == false) {
          if (module.isAnnotation() == false) {
            if (module.isLocalClass() == false) {
View Full Code Here

  @Inject
  public Plugins(PluginManager pluginManager) {
    this.pluginManager = pluginManager;
    pluginList = pluginManager.loadAll();

    Reflections reflections = new Reflections("com.crawljax.core.plugin");
    basePluginClasses = reflections.getSubTypesOf(com.crawljax.core.plugin.Plugin.class);
  }
View Full Code Here

    }

    ClassLoader newClassLoader = new URLClassLoader(new URL[]{instanceURL}, Thread.currentThread().getContextClassLoader());
    Thread.currentThread().setContextClassLoader(newClassLoader);

    Reflections reflections = new Reflections(new ConfigurationBuilder()
          .addUrls(instanceURL, ClasspathHelper.forClass(com.crawljax.core.plugin.Plugin.class))
          .addClassLoader(newClassLoader));

    Set<Class<? extends com.crawljax.core.plugin.Plugin>> pluginClasses = reflections.getSubTypesOf(com.crawljax.core.plugin.Plugin.class);
    pluginClasses.removeAll(basePluginClasses);

    com.crawljax.core.plugin.Plugin instance = null;
    for(Class<? extends com.crawljax.core.plugin.Plugin> pluginClass : pluginClasses) {
      try {
View Full Code Here

            }
        };

        final String myNameSpaceToScan = getNameSpace();

        final Reflections reflections = new Reflections(new ConfigurationBuilder().filterInputsBy(
                    new FilterBuilder.Include(FilterBuilder.prefix(myNameSpaceToScan))).setUrls(
                    ClasspathHelper.forPackage(myNameSpaceToScan)).setScanners(new TypeAnnotationsScanner()
                        .filterResultsBy(filter)));
        final Set<Class<?>> objectMapper = reflections.getTypesAnnotatedWith(GlobalObjectMapper.class);

        return objectMapper;
    }
View Full Code Here

  public static void scanClassPathForFormattingAnnotations() {

    ExecutorService executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2);

    // scan classpath and filter out classes that don't begin with "com.nds"
    Reflections ndsReflections = new Reflections("com.nds");

    Set<Class<?>> annotated = ndsReflections.getTypesAnnotatedWith(DefaultFormat.class);

        Reflections ciscoReflections = new Reflections("com.cisco");

        annotated.addAll(ciscoReflections.getTypesAnnotatedWith(DefaultFormat.class));

    for (Class<?> markerClass : annotated) {

      // if the marker class is indeed implementing FoundationLoggingMarker
      // interface
View Full Code Here

    private final Reflections reflections;

    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

TOP

Related Classes of org.reflections.reflections$TestModel$I3$annotations

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.