Class ServiceUtils


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

      • ServiceUtils

        public ServiceUtils()
    • Method Detail

      • 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