Class ClassPathBuilder


  • public final class ClassPathBuilder
    extends Object
    Builds up a ClassLoader.
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • ClassPathBuilder

        public ClassPathBuilder​(ClassLoader parent)
    • Method Detail

      • 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