Interface RuntimeHintsRegistrar

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RuntimeHintsRegistrar
Contract for registering RuntimeHints based on the ClassLoader of the deployment unit. Implementations should, if possible, use the specified ClassLoader to determine if hints have to be contributed.

Implementations of this interface can be registered dynamically by using @ImportRuntimeHints or statically in META-INF/spring/aot.factories by using the fully-qualified class name of this interface as the key. A standard no-arg constructor is required for implementations.

Since:
6.0
Author:
Brian Clozel, Stephane Nicoll
  • Method Details

    • registerHints

      void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
      Contribute hints to the given RuntimeHints instance.
      Parameters:
      hints - the hints contributed so far for the deployment unit
      classLoader - the classloader, or null if even the system ClassLoader is not accessible