@Test public void getAllExtensionClass() { List<Class> allExtensionClass = EnhancedServiceLoader.getAllExtensionClass(Hello.class); assertThat(allExtensionClass.get(2).getSimpleName()).isEqualTo((FrenchHello.class.getSimpleName())); assertThat(allExtensionClass.get(1).getSimpleName()).isEqualTo((EnglishHello.class.getSimpleName())); assertThat(allExtensionClass.get(0).getSimpleName()).isEqualTo((ChineseHello.class.getSimpleName())); }
@SuppressWarnings("rawtypes") public static <S> List<Class> getAllExtensionClass(Class<S> service) { return findAllExtensionClass(service, null, findClassLoader()); }
EnhancedServiceLoader { @SuppressWarnings("rawtypes") public static <S> List<Class> getAllExtensionClass(Class<S> service) { return findAllExtensionClass(service, null, findClassLoader()); } }
EnhancedServiceLoader { @SuppressWarnings("rawtypes") public static <S> List<Class> getAllExtensionClass(Class<S> service) { return findAllExtensionClass(service, null, findClassLoader()); }  }
EnhancedServiceLoader { @SuppressWarnings("rawtypes") public static <S> List<Class> getAllExtensionClass(Class<S> service) { return findAllExtensionClass(service, null, findClassLoader()); }  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 { @SuppressWarnings("rawtypes") public static <S> List<Class> getAllExtensionClass(Class<S> service) { return findAllExtensionClass(service, null, findClassLoader()); }  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);  }