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:
- [email protected]
-
-
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)
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
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
- Overrides:
getResources
in classClassLoader
- Throws:
IOException
-
findResource
protected URL findResource(String name)
- Overrides:
findResource
in classClassLoader
-
findClass
protected Class<?> findClass(String name) throws ClassNotFoundException
- Overrides:
findClass
in classClassLoader
- Throws:
ClassNotFoundException
-
-