Class ComponentClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- io.streamthoughts.azkarra.streams.components.isolation.ComponentClassLoader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ComponentClassLoader extends URLClassLoader
Default ClassLoader for loading components using a 'child-first strategy'. In other words, this ClassLoader attempts to find the class in its own context before delegating to the parent ClassLoader.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URL
getResource(String name)
Enumeration<URL>
getResources(String name)
protected Class<?>
loadClass(String name, boolean resolve)
String
location()
static ComponentClassLoader
newClassLoader(URL componentLocation, URL[] urls, ClassLoader parent)
String
toString()
-
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
-
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
-
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Method Detail
-
newClassLoader
public static ComponentClassLoader newClassLoader(URL componentLocation, URL[] urls, ClassLoader parent)
-
location
public String location()
-
loadClass
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
- Overrides:
loadClass
in classClassLoader
- Throws:
ClassNotFoundException
-
getResources
public Enumeration<URL> getResources(String name) throws IOException
- Overrides:
getResources
in classClassLoader
- Throws:
IOException
-
getResource
public URL getResource(String name)
- Overrides:
getResource
in classClassLoader
-
-