Interface AotContext.TypeIntrospector

Enclosing interface:
AotContext

public static interface AotContext.TypeIntrospector
Type-based introspector to resolve Class from a type name and to introspect the bean factory for presence of beans.
  • Method Details

    • isTypePresent

      boolean isTypePresent()
      Determines whether @link Class type} is present on the application classpath.
      Returns:
      true if the type is present on the application classpath.
      See Also:
    • resolveRequiredType

      Class<?> resolveRequiredType() throws TypeNotPresentException
      Resolves the required named type.
      Returns:
      a resolved type for the given.
      Throws:
      TypeNotPresentException - if the type cannot be found.
    • resolveType

      Optional<Class<?>> resolveType()
      Resolves the type if present.
      Returns:
      an Optional value containing the type if the type is present on the application classpath.
      See Also:
    • ifTypePresent

      default void ifTypePresent(Consumer<Class<?>> action)
      Determines whether the type is declared on the application classpath and performs the given, required action if present.
      Parameters:
      action - Consumer defining the action to perform on the resolved type; must not be null.
      See Also:
    • hasBean

      boolean hasBean()
      Determines whether the associated bean factory contains at least one bean of this type.
      Returns:
      true if the type is present on the application classpath.
    • getBeanNames

      List<String> getBeanNames()
      Return a List containing bean names that implement this type.
      Returns:
      a List of bean names. The list is empty if the bean factory does not hold any beans of this type.