Package org.infinispan.commons.util
Class AggregatedClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- org.infinispan.commons.util.AggregatedClassLoader
-
public final class AggregatedClassLoader extends ClassLoader
A ClassLoader that delegates loading of classes and resources to a list of delegate ClassLoaders. The loading is attempted in the order returned by the providedCollection
.- Since:
- 9.2
- Author:
- anistor@redhat.com
-
-
Constructor Summary
Constructors Constructor Description AggregatedClassLoader(Collection<ClassLoader> classLoaders)
Create an aggregated ClassLoader from a Collection of ClassLoaders
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<?>
findClass(String name)
protected URL
findResource(String name)
Enumeration<URL>
getResources(String name)
-
-
-
Constructor Detail
-
AggregatedClassLoader
public AggregatedClassLoader(Collection<ClassLoader> classLoaders)
Create an aggregated ClassLoader from a Collection of ClassLoaders- Parameters:
classLoaders
- a non-empty Collection of ClassLoaders
-
-
Method Detail
-
getResources
public Enumeration<URL> getResources(String name) throws IOException
- Throws:
IOException
-
findClass
protected Class<?> findClass(String name) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
-