public final class ChildFirstClassLoader extends FlinkUserCodeClassLoader
URLClassLoader.getResourceAsStream(String)
uses getResource(String)
internally so we don't
override that.
NOOP_EXCEPTION_HANDLER
Constructor and Description |
---|
ChildFirstClassLoader(URL[] urls,
ClassLoader parent,
String[] alwaysParentFirstPatterns,
java.util.function.Consumer<Throwable> classLoadingExceptionHandler) |
Modifier and Type | Method and Description |
---|---|
URL |
getResource(String name) |
Enumeration<URL> |
getResources(String name) |
protected Class<?> |
loadClassWithoutExceptionHandling(String name,
boolean resolve)
Same as
FlinkUserCodeClassLoader.loadClass(String, boolean) but without exception handling. |
loadClass
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ChildFirstClassLoader(URL[] urls, ClassLoader parent, String[] alwaysParentFirstPatterns, java.util.function.Consumer<Throwable> classLoadingExceptionHandler)
protected Class<?> loadClassWithoutExceptionHandling(String name, boolean resolve) throws ClassNotFoundException
FlinkUserCodeClassLoader
FlinkUserCodeClassLoader.loadClass(String, boolean)
but without exception handling.
Extending concrete class loaders should implement this instead of FlinkUserCodeClassLoader.loadClass(String, boolean)
.
loadClassWithoutExceptionHandling
in class FlinkUserCodeClassLoader
ClassNotFoundException
public URL getResource(String name)
getResource
in class ClassLoader
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.