Interface TypeResolverProvider

All Superinterfaces:
Comparable<OrderedServiceProvider>, OrderedServiceProvider

public interface TypeResolverProvider extends OrderedServiceProvider
The TypeResolverProvider interface represents a service provider interface (SPI) for providing instances of TypeResolver. This interface extends OrderedServiceProvider, indicating that implementations can have a priority order.
  • Method Details

    • instance

      default TypeResolver instance(RuntimeContext<?> context)
      Provides an instance of TypeResolver based on the provided RuntimeContext. This is a convenience default method that essentially retrieves the class loader from the context and delegates the work to the instance(ClassLoader) method.
      Parameters:
      context - The runtime context from which the class loader will be retrieved.
      Returns:
      An instance of TypeResolver suitable for the given context.
    • instance

      TypeResolver instance(ClassLoader classLoader)
      Provides an instance of TypeResolver using the specified ClassLoader.
      Parameters:
      classLoader - The class loader to be used for loading classes and resources.
      Returns:
      An instance of TypeResolver configured to use the given ClassLoader.