Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Jun 9, 2022
1 parent 3637228 commit 1e5f4f8
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@
import org.springframework.lang.Nullable;

/**
* Contract for registering {@link RuntimeHints} in a static fashion.
* <p>Implementations will contribute hints without any knowledge of the application context
* and can only use the given {@link ClassLoader} to conditionally contribute hints.
* <p>{@code RuntimeHintsRegistrar} can be declared as {@code spring/aot.factories} entries;
* the registrar will be processed as soon as its declaration is found in the classpath.
* A standard no-arg constructor is required for implementations.
* Contract for registering {@link RuntimeHints} based on the {@link ClassLoader}
* of the deployment unit. Implementations should, if possible, use the specified
* {@link ClassLoader} to determine if hints have to be contributed.
*
* <p>Implementations of this interface can be registered statically in
* {@code META-INF/spring/aot.factories} by using the FQN of this interface as
* the key. A standard no-arg constructor is required for implementations.
*
* @author Brian Clozel
* @author Stephane Nicoll
* @since 6.0
*/
@FunctionalInterface
public interface RuntimeHintsRegistrar {

/**
* Contribute hints to the given {@link RuntimeHints} instance.
* @param hints the hints contributed so far for the application
* @param hints the hints contributed so far for the deployment unit
* @param classLoader the classloader, or {@code null} if even the system ClassLoader isn't accessible
*/
void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader);
Expand Down

0 comments on commit 1e5f4f8

Please sign in to comment.