# Class DynamicClassLoader

java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.jmeter.DynamicClassLoader

All Implemented Interfaces:
  `Closeable, AutoCloseable`

public class DynamicClassLoader extends URLClassLoader
This is a basic URL classloader for loading new resources dynamically. It allows public access to the addURL() method. It also adds a convenience method to update the current thread classloader

## Constructor Summary

Constructors
Constructor
Description
`DynamicClassLoader(URL[] urls)`
`DynamicClassLoader(URL[] urls, ClassLoader parent)`
`DynamicClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addURL(URL url)`
`static void`
`updateLoader(URL[] urls)`

### Methods inherited from class URLClassLoader

`close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance`

### Methods inherited from class SecureClassLoader

`defineClass, defineClass`

### Methods inherited from class ClassLoader

`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DynamicClassLoader

public DynamicClassLoader(URL[] urls)

### DynamicClassLoader

public DynamicClassLoader(URL[] urls, ClassLoader parent)

### DynamicClassLoader

public DynamicClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)

## Method Details

### addURL

public void addURL(URL url)

Overrides:
  `addURL` in class `URLClassLoader`

### updateLoader

public static void updateLoader(URL[] urls)

Parameters:
  `urls` - - list of URLs to add to the thread's classloader