public ConfigurationBuilder forPackages(String... packages) { for (String pkg : packages) { addUrls(ClasspathHelper.forPackage(pkg)); } return this; }
/** * Returns a distinct collection of URLs based on URLs derived from class loaders expanded with Manifest information. * <p> * The {@code MANIFEST.MF} file can contain a {@code Class-Path} entry that defines * additional jar files to be included on the classpath. This method finds the jar files * using the {@link #contextClassLoader()} and {@link #staticClassLoader()}, before * searching for any additional manifest classpaths. * * @return the collection of URLs, not null */ public static Collection<URL> forManifest() { return forManifest(forClassLoader()); }
/** * Returns a distinct collection of URLs based on URLs derived from class loaders. * <p> * This finds the URLs using {@link URLClassLoader#getURLs()} using both * {@link #contextClassLoader()} and {@link #staticClassLoader()}. * <p> * The returned URLs retains the order of the given {@code classLoaders}. * * @return the collection of URLs, not null */ public static Collection<URL> forClassLoader() { return forClassLoader(classLoaders()); }
/** include a package of a given class */ public FilterBuilder includePackage(final Class<?> aClass) {return add(new Include(packageNameRegex(aClass)));}
/** exclude a package of a given class */ public FilterBuilder excludePackage(final Class<?> aClass) {return add(new Exclude(packageNameRegex(aClass)));}
/** add class loader, might be used for resolving methods/fields */ public ConfigurationBuilder addClassLoader(ClassLoader classLoader) { return addClassLoaders(classLoader); }
public void close() { Utils.close(jarInputStream); } }
public ConfigurationBuilder forPackages(String... packages) { for (String pkg : packages) { addUrls(ClasspathHelper.forPackage(pkg)); } return this; }
/** include a package of a given class */ public FilterBuilder includePackage(final Class<?> aClass) {return add(new Include(packageNameRegex(aClass)));}
/** exclude a package of a given class */ public FilterBuilder excludePackage(final Class<?> aClass) {return add(new Exclude(packageNameRegex(aClass)));}
/** add class loader, might be used for resolving methods/fields */ public ConfigurationBuilder addClassLoader(ClassLoader classLoader) { return addClassLoaders(classLoader); }
public void close() { Utils.close(jarInputStream); } }