Class 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 Detail

      • SubmoduleClassLoader

        public SubmoduleClassLoader​(URL[] classpath,
                                    ClassLoader parentClassLoader)