All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xapi.dev.scanner.api.ClasspathScanner Maven / Gradle / Ivy

Go to download

This module exists solely to package all other gwt modules into a single uber jar. This makes deploying to non-mavenized targets much easier. Of course, you would be wise to inherit your dependencies individually; the uber jar is intended for projects like collide, which have complex configuration, and adding many jars would be a pain.

The newest version!
package xapi.dev.scanner.api;

import java.lang.annotation.Annotation;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;

import xapi.dev.scanner.impl.ClasspathResourceMap;

/**
 * Most runtime annotation scanner libraries are too heavyweight;
 * they try to do too much.  Though great tools, we want flyweight and fast.
 *
 * This service is based on org.reflections:reflections,
 * except we are doing much less,
 * and using an api that will enable multi-threaded scanning,
 * using a work-stealing algorithm to fill in a PackageTrie.
 *
 * @author "James X. Nelson ([email protected])"
 *
 */
public interface ClasspathScanner {

  ClasspathScanner scanPackage(String pkg);
  ClasspathScanner scanPackages(String ... pkgs);
  ClasspathScanner scanAnnotation(Class annotations);
  ClasspathScanner scanAnnotations(@SuppressWarnings("unchecked") Class ... annotations);
  ClasspathScanner matchClassFile(String regex);
  ClasspathScanner matchClassFiles(String ... regex);
  ClasspathScanner matchSourceFile(String regex);
  ClasspathScanner matchSourceFiles(String ... regex);
  ClasspathScanner matchResource(String regex);
  ClasspathScanner matchResources(String ... regex);

  ClasspathResourceMap scan(ClassLoader loader);
  Callable scan(ClassLoader loader, ExecutorService executor);
  ExecutorService newExecutor();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy