public static void load(Class<?> restrictionClass){
  if (MASTER_CACHE == null) {
    initialize();
  }
  if (MASTER_CACHE.isEmpty()) {
    return;
  }
  Iterator<Class<?>> iter=MASTER_CACHE.iterator();
  while (iter.hasNext()) {
    Class<?> clazz=iter.next();
    if (!restrictionClass.isAssignableFrom(clazz)) {
      continue;
    }
    if (Modifier.isInterface(clazz.getModifiers()) || Modifier.isAbstract(clazz.getModifiers()) || Modifier.isPrivate(clazz.getModifiers())) {
      continue;
    }
    boolean instantiable=false;
    try {
      instantiable=clazz.getConstructor() != null;
    }
 catch (    Exception|Error e) {
    }
    try {
      instantiable=instantiable || ClassGenericsUtil.getParameterizer(clazz) != null;
    }
 catch (    Exception|Error e) {
    }
    if (!instantiable) {
      continue;
    }
    ELKIServiceRegistry.register(restrictionClass,clazz);
  }
}

public static void load ( Class < ? > restrictionClass ) { if ( MASTER_CACHE == null ) { initialize ( ) ; } if ( MASTER_CACHE . isEmpty ( ) ) { return ; } Iterator < Class < ? > > iter = MASTER_CACHE . iterator ( ) ; while ( iter . hasNext ( ) ) { Class < ? > clazz = iter . next ( ) ; if ( ! restrictionClass . isAssignableFrom ( clazz ) ) { continue ; } if ( Modifier . isInterface ( clazz . getModifiers ( ) ) || Modifier . isAbstract ( clazz . getModifiers ( ) ) || Modifier . isPrivate ( clazz . getModifiers ( ) ) ) { continue ; } boolean instantiable = false ; try { instantiable = clazz . getConstructor ( ) != null ; } catch ( Exception | Error e ) { } try { instantiable = instantiable || ClassGenericsUtil . getParameterizer ( clazz ) != null ; } catch ( Exception | Error e ) { } if ( ! instantiable ) { continue ; } ELKIServiceRegistry . register ( restrictionClass , clazz ) ; } }
load classes via linear scanning .
