public final class ClassPathBuilder extends Object
ClassLoader.| Constructor and Description |
|---|
ClassPathBuilder(ClassLoader parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassFolder(File classFolder)
Adds a single class folder.
|
void |
addGlob(File folder,
String... masks)
Looks for the child files/directories in the given folder that matches the specified GLOB patterns
(like "foo-*.jar") and adds them to the classpath.
|
void |
addJar(File jar)
Adds a single jar.
|
void |
addJarFolder(File folder,
String... excludes)
Adds all jars in the given folder.
|
ClassLoader |
create() |
public ClassPathBuilder(ClassLoader parent)
public void addJar(File jar) throws IOException
IOExceptionpublic void addClassFolder(File classFolder) throws IOException
IOExceptionpublic void addJarFolder(File folder, String... excludes) throws IOException
folder - A directory that contains a bunch of jar files.excludes - List of jars to be excludedIOExceptionpublic void addGlob(File folder, String... masks) throws IOException
IOExceptionpublic ClassLoader create()
Copyright © 2017. All rights reserved.