public static List<Class<?>> findAllImplementations(Class<?> restrictionClass){
  if (restrictionClass == null) {
    return Collections.emptyList();
  }
  if (!contains(restrictionClass)) {
    ELKIServiceLoader.load(restrictionClass);
    ELKIServiceScanner.load(restrictionClass);
  }
  Entry e=data.get(restrictionClass);
  if (e == null) {
    return Collections.emptyList();
  }
  ArrayList<Class<?>> ret=new ArrayList<>(e.len);
  for (int pos=0; pos < e.len; pos++) {
    Class<?> c=e.clazzes[pos];
    if (c == null) {
      c=tryLoadClass(e.names[pos]);
      if (c == null) {
        LOG.warning("Failed to load class " + e.names[pos] + " for interface "+ restrictionClass.getName());
        c=FAILED_LOAD;
      }
      e.clazzes[pos]=c;
    }
    if (c == FAILED_LOAD) {
      continue;
    }
    if (!ret.contains(c)) {
      ret.add(c);
    }
  }
  return ret;
}

public static List < Class < ? > > findAllImplementations ( Class < ? > restrictionClass ) { if ( restrictionClass == null ) { return Collections . emptyList ( ) ; } if ( ! contains ( restrictionClass ) ) { ELKIServiceLoader . load ( restrictionClass ) ; ELKIServiceScanner . load ( restrictionClass ) ; } Entry e = data . get ( restrictionClass ) ; if ( e == null ) { return Collections . emptyList ( ) ; } ArrayList < Class < ? > > ret = new ArrayList < > ( e . len ) ; for ( int pos = 0 ; pos < e . len ; pos ++ ) { Class < ? > c = e . clazzes [ pos ] ; if ( c == null ) { c = tryLoadClass ( e . names [ pos ] ) ; if ( c == null ) { LOG . warning ( "Failed to load class " + e . names [ pos ] + " for interface " + restrictionClass . getName ( ) ) ; c = FAILED_LOAD ; } e . clazzes [ pos ] = c ; } if ( c == FAILED_LOAD ) { continue ; } if ( ! ret . contains ( c ) ) { ret . add ( c ) ; } } return ret ; }
find all implementations of a particular interface .
