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
IOException
public void addClassFolder(File classFolder) throws IOException
IOException
public void addJarFolder(File folder, String... excludes) throws IOException
folder
- A directory that contains a bunch of jar files.excludes
- List of jars to be excludedIOException
public void addGlob(File folder, String... masks) throws IOException
IOException
public ClassLoader create()
Copyright © 2018. All rights reserved.