Class AotRunnerClassLoader

java.lang.Object
java.lang.ClassLoader
io.quarkus.bootstrap.runner.AotRunnerClassLoader

public class AotRunnerClassLoader extends ClassLoader
A ClassLoader that behaves similarly to the RunnerClassLoader for resources but delegates all class loading to the JDK application class loader. The idea is that it lets us optimize the resource case, while still benefiting from AOT. Our hope is that we will be able to use a fully custom ClassLoader with Project Leyden at some point but we are not there yet. Key characteristics: - All class loading is delegated to the parent - Resource lookups are intercepted for the service files and otherwise delegated to the parent - For some selected directories, we have a full index of the content so that we can avoid negative lookups in the parent Note that not all ServiceLoader calls will hit this ClassLoader as some low levels one are directly hitting the ClassLoader used to load the classes, thus circumventing the optimizations we have in this ClassLoader. It is an expected behavior though, and will be vastly improved once we can use a custom ClassLoader with Leyden.