@Test public void testLoadByClassAndClassLoader() { Hello load = EnhancedServiceLoader.load(Hello.class, Hello.class.getClassLoader()); Assertions.assertEquals(load.say(), "Bonjour"); }
public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException { return loadFile(service, null, loader); }
EnhancedServiceLoader { public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException { return loadFile(service, null, loader); } }
EnhancedServiceLoader { public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException { return loadFile(service, null, loader); }  }
EnhancedServiceLoader { public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException { return loadFile(service, null, loader); }  static S load(Class<S> service, ClassLoader loader); static S load(Class<S> service); static S load(Class<S> service, String activateName); static S load(Class<S> service, String activateName, ClassLoader loader); static S load(Class<S> service, String activateName, Object[] args); static S load(Class<S> service, String activateName, Class[] argsType, Object[] args); static List<S> loadAll(Class<S> service); @SuppressWarnings("rawtypes") // static List<Class> getAllExtensionClass(Class<S> service); @SuppressWarnings("rawtypes") // static List<Class> getAllExtensionClass(Class<S> service, ClassLoader loader); }
EnhancedServiceLoader { public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException { return loadFile(service, null, loader); }  static S load(Class<S> service, ClassLoader loader); static S load(Class<S> service); static S load(Class<S> service, String activateName); static S load(Class<S> service, String activateName, ClassLoader loader); static S load(Class<S> service, String activateName, Object[] args); static S load(Class<S> service, String activateName, Class[] argsType, Object[] args); static List<S> loadAll(Class<S> service); @SuppressWarnings("rawtypes") // static List<Class> getAllExtensionClass(Class<S> service); @SuppressWarnings("rawtypes") // static List<Class> getAllExtensionClass(Class<S> service, ClassLoader loader);  }