Class GeneratedService

java.lang.Object
io.helidon.service.registry.GeneratedService

public final class GeneratedService extends Object
All types in this class are used from generated code for services.
  • Method Details

    • discoverServices

      public static <T extends NamedService> List<T> discoverServices(Config config, String configKey, ServiceRegistry serviceRegistry, Class<? extends ConfiguredProvider<T>> providerType, Class<T> configType, boolean allFromRegistry, List<T> existingValues)
      Used to discover services from ServiceRegistry for builder options annotated with Option.Provider, if the blueprint is annotated with Prototype.RegistrySupport.
      Type Parameters:
      T - type of the service
      Parameters:
      config - configuration of the option
      configKey - configuration key associated with this option
      serviceRegistry - service registry instance
      providerType - type of the service provider (contract)
      configType - type of the configuration
      allFromRegistry - whether to use all services from the registry
      existingValues - existing values that was explicitly configured by the user
      Returns:
      instances from the user augmented with instances from the registry
    • discoverService

      public static <T extends NamedService> Optional<T> discoverService(Config config, String configKey, ServiceRegistry serviceRegistry, Class<? extends ConfiguredProvider<T>> providerType, Class<T> configType, boolean discoverServices, Optional<T> existingValue)
      Used to discover service from ServiceRegistry for builder options annotated with Option.Provider, if the blueprint is annotated with Prototype.RegistrySupport.
      Type Parameters:
      T - type of the service
      Parameters:
      config - configuration of the option
      configKey - configuration key associated with this option
      serviceRegistry - service registry instance
      providerType - type of the service provider (contract)
      configType - type of the configuration
      discoverServices - whether to discover services from registry
      existingValue - existing value that was explicitly configured by the user
      Returns:
      an instance, if available in the registry, or if provided by the user (user's value wins)