/*
 * Copyright 2005 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package org.apache.jmeter;

import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLStreamHandlerFactory;

/**
 * @author pete
 *
 * This is a basic URL classloader for loading new resources
 * dynamically
 */
public class DynamicClassLoader extends URLClassLoader {

	/**
	 * @param arg0
	 */
	public DynamicClassLoader(URL[] urls) {
		super(urls);
	}

	/**
	 * @param arg0
	 * @param arg1
	 */
	public DynamicClassLoader(URL[] urls, ClassLoader parent) {
		super(urls, parent);
	}

	/**
	 * @param arg0
	 * @param arg1
	 * @param arg2
	 */
	public DynamicClassLoader(URL[] urls, ClassLoader parent,
			URLStreamHandlerFactory factory) {
		super(urls, parent, factory);
	}

    public void addURL(URL url) {
        super.addURL(url);
    }
}

@@ -831,16 +831,157 @@
 amically
+.%0A * %0A * It allows public access to the addURL() method.%0A * %0A * It also adds a convenience method to update the current thread classloader%0A *
 %0A */%0Apub
@@ -1039,34 +1039,8 @@
  %7B%0A%0A
-%09/**%0A%09 * @param arg0%0A%09 */%0A
 %09pub
@@ -1099,50 +1099,8 @@
 %09%7D%0A%0A
-%09/**%0A%09 * @param arg0%0A%09 * @param arg1%0A%09 */%0A
 %09pub
@@ -1187,66 +1187,8 @@
 %09%7D%0A%0A
-%09/**%0A%09 * @param arg0%0A%09 * @param arg1%0A%09 * @param arg2%0A%09 */%0A
 %09pub
@@ -1316,16 +1316,54 @@
 y);%0A%09%7D%0A%0A
+    // Make the addURL method visible%0A
     publ
@@ -1420,11 +1420,367 @@
 );%0A    %7D
+%0A%0A    /**%0A     * %0A     * @param urls - list of URLs to add to the thread's classloader%0A     */%0A    public static void updateLoader(URL %5B%5D urls) %7B%0A        DynamicClassLoader loader %0A            = (DynamicClassLoader) Thread.currentThread().getContextClassLoader();%0A        for(int i=0;i%3Curls.length;i++) %7B%0A            loader.addURL(urls%5Bi%5D);%0A        %7D%0A    %7D
 %0A%7D%0A

Add updateLoader() convenience method