Class ClassPathBuilder
- java.lang.Object
-
- com.sun.enterprise.glassfish.bootstrap.ClassPathBuilder
-
public final class ClassPathBuilder extends Object
Builds up aClassLoader.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description ClassPathBuilder(ClassLoader parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClassFolder(File classFolder)Adds a single class folder.voidaddGlob(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.voidaddJar(File jar)Adds a single jar.voidaddJarFolder(File folder, String... excludes)Adds all jars in the given folder.ClassLoadercreate()
-
-
-
Constructor Detail
-
ClassPathBuilder
public ClassPathBuilder(ClassLoader parent)
-
-
Method Detail
-
addJar
public void addJar(File jar) throws IOException
Adds a single jar.- Throws:
IOException
-
addClassFolder
public void addClassFolder(File classFolder) throws IOException
Adds a single class folder.- Throws:
IOException
-
addJarFolder
public void addJarFolder(File folder, String... excludes) throws IOException
Adds all jars in the given folder.- Parameters:
folder- A directory that contains a bunch of jar files.excludes- List of jars to be excluded- Throws:
IOException
-
addGlob
public void addGlob(File folder, String... masks) throws IOException
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.- Throws:
IOException
-
create
public ClassLoader create()
-
-