public class ExtensionsClassLoader extends URLClassLoader
ClassLoader
for loading extensions to core Alluxio. This class loader first
scans the provided URLs to define a class and in case the class is not found it will fallback to
the provided default class loader.Constructor and Description |
---|
ExtensionsClassLoader(URL[] urls,
ClassLoader defaultClassLoader) |
Modifier and Type | Method and Description |
---|---|
void |
addPath(String path)
Adds a path where the class loader can load resource from.
|
protected Class<?> |
findClass(String name) |
Enumeration<URL> |
getResources(String name) |
Class<?> |
loadClass(String name,
boolean resolve) |
addURL, close, definePackage, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ExtensionsClassLoader(URL[] urls, ClassLoader defaultClassLoader)
urls
- array of URLs of jarsdefaultClassLoader
- the default class loader to fall backprotected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class URLClassLoader
ClassNotFoundException
public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
public void addPath(String path) throws MalformedURLException
path
- the path to addMalformedURLException
Copyright © 2023. All Rights Reserved.