1 package org.codehaus.groovy.control; 2 3 import java.io.File; 4 import java.net.URL; 5 import java.net.URLClassLoader; 6 import java.net.MalformedURLException; 7 8 public class CompilerClassLoader 9 extends URLClassLoader 10 { 11 private static final URL[] EMPTY_URL_ARRAY = new URL[0]; 12 13 public CompilerClassLoader() 14 { 15 super( EMPTY_URL_ARRAY ); 16 } 17 18 public void addPath(String path) 19 throws MalformedURLException 20 { 21 addURL( new File( path ).toURL() ); 22 } 23 }