Class RuntimeHintsUtils

java.lang.Object
org.springframework.aot.hint.support.RuntimeHintsUtils

public abstract class RuntimeHintsUtils extends Object
Utility methods for runtime hints support code.
Since:
6.0
Author:
Stephane Nicoll
  • Field Details

    • ANNOTATION_HINT

      public static final Consumer<TypeHint.Builder> ANNOTATION_HINT
      A TypeHint customizer suitable for an annotation. Make sure that its attributes are visible.
  • Constructor Details

    • RuntimeHintsUtils

      public RuntimeHintsUtils()
  • Method Details

    • registerAnnotation

      public static void registerAnnotation(RuntimeHints hints, Class<?> annotationType)
      Register the necessary hints so that the specified annotation is visible at runtime.

      If an annotation attribute aliases an attribute of another annotation, the other annotation is registered as well and a JDK proxy hint is defined so that the synthesized annotation can be resolved.

      Parameters:
      hints - the RuntimeHints instance to use
      annotationType - the annotation type
      See Also: