Class ServiceUtils

java.lang.Object
net.ontopia.utils.ServiceUtils

public class ServiceUtils extends Object
Utility to load dynamic services from classpath.
Since:
5.4.0
  • Field Details

  • Constructor Details

    • ServiceUtils

      public ServiceUtils()
  • Method Details

    • loadServices

      public static <T> Set<T> loadServices(Class<T> clazz) throws IOException
      Calls #loadServices(java.lang.Class, java.lang.String) with resource as the default location: META-INF/services/[classname].
      Type Parameters:
      T - The type of the services to load
      Parameters:
      clazz - The class that the services have to implement
      Returns:
      The service instances found on the classpath
      Throws:
      IOException