public Class<?> loadClass(String name) throws ClassNotFoundException {
  if (bestCandidate != null) {
    try {
      return bestCandidate.loadClass(name);
    }
 catch (    Throwable t) {
      bestCandidate=null;
    }
  }
  Throwable throwable=null;
  Class<?> clazz=null;
  ClassLoadHelper loadHelper=null;
  Iterator<ClassLoadHelper> iter=loadHelpers.iterator();
  while (iter.hasNext()) {
    loadHelper=iter.next();
    try {
      clazz=loadHelper.loadClass(name);
      break;
    }
 catch (    Throwable t) {
      throwable=t;
    }
  }
  if (clazz == null) {
    if (throwable instanceof ClassNotFoundException) {
      throw (ClassNotFoundException)throwable;
    }
 else {
      throw new ClassNotFoundException(String.format("Unable to load class %s by any known loaders.",name),throwable);
    }
  }
  bestCandidate=loadHelper;
  return clazz;
}

public Class < ? > loadClass ( String name ) throws ClassNotFoundException { if ( bestCandidate != null ) { try { return bestCandidate . loadClass ( name ) ; } catch ( Throwable t ) { bestCandidate = null ; } } Throwable throwable = null ; Class < ? > clazz = null ; ClassLoadHelper loadHelper = null ; Iterator < ClassLoadHelper > iter = loadHelpers . iterator ( ) ; while ( iter . hasNext ( ) ) { loadHelper = iter . next ( ) ; try { clazz = loadHelper . loadClass ( name ) ; break ; } catch ( Throwable t ) { throwable = t ; } } if ( clazz == null ) { if ( throwable instanceof ClassNotFoundException ) { throw ( ClassNotFoundException ) throwable ; } else { throw new ClassNotFoundException ( String . format ( "Unable to load class %s by any known loaders." , name ) , throwable ) ; } } bestCandidate = loadHelper ; return clazz ; }
return the class with the given name .
