Class ServiceUtils

java.lang.Object
io.helidon.inject.runtime.ServiceUtils

public final class ServiceUtils extends Object
Public helpers around shared services usages.
  • Method Details

    • isQualifiedInjectionTarget

      public static boolean isQualifiedInjectionTarget(ServiceProvider<?> sp)
      Determines if the service provider is valid to receive injections.
      Parameters:
      sp - the service provider
      Returns:
      true if the service provider can receive injection
    • toDescription

      public static String toDescription(Object provider)
      Provides a ServiceProvider.description(), falling back to Object.toString() on the passed provider argument.
      Parameters:
      provider - the provider
      Returns:
      the description
    • toDescriptions

      public static List<String> toDescriptions(Collection<?> coll)
      Provides a ServiceProvider.description(), falling back to Object.toString() on the passed provider argument.
      Parameters:
      coll - the collection of providers
      Returns:
      the description