Class SubmoduleClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- org.apache.flink.core.classloading.ComponentClassLoader
-
- org.apache.flink.core.classloading.SubmoduleClassLoader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class SubmoduleClassLoader extends ComponentClassLoader
Loads all classes from the submodule jar, except for explicitly white-listed packages.To ensure that classes from the submodule are always loaded through the submodule classloader (and thus from the submodule jar), even if the classes are also on the classpath (e.g., during tests), all classes from the "org.apache.flink" package are loaded child-first.
Classes related to logging (e.g., log4j) are loaded parent-first.
All other classes can only be loaded if they are either available in the submodule jar or the bootstrap/app classloader (i.e., provided by the JDK).
-
-
Constructor Summary
Constructors Constructor Description SubmoduleClassLoader(URL[] classpath, ClassLoader parentClassLoader)
-
Method Summary
-
Methods inherited from class org.apache.flink.core.classloading.ComponentClassLoader
getResource, getResourceAsStream, getResources, loadClass
-
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, 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
-
-
-
-
Constructor Detail
-
SubmoduleClassLoader
public SubmoduleClassLoader(URL[] classpath, ClassLoader parentClassLoader)
-
-