Examples of Reflections


Examples of org.reflections.Reflections

        .forClassLoader())) {
      if (url.toString().toLowerCase().endsWith(".jar")) {
        urls.add(url);
      }
    }
    this.reflections = new Reflections(new ConfigurationBuilder()
        .setScanners(new TypeAnnotationsScanner())
        .setUrls(ClasspathHelper.forPackage("")).addUrls(urls));
  }

Examples of org.reflections.Reflections

    mapper.disable(SerializationFeature.FLUSH_AFTER_WRITE_VALUE);
    mapper.disable(SerializationFeature.CLOSE_CLOSEABLE);
    mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
    mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

    Reflections reflections = new Reflections("com.twitter.ambrose");
    Set<Class<? extends Job>> jobSubTypes = reflections.getSubTypesOf(Job.class);
    mapper.registerSubtypes(jobSubTypes.toArray(new Class<?>[jobSubTypes.size()]));
    return mapper;
  }
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.