code: public static <T> Class<T> classForName(String pClassName,boolean pInitialize,ClassLoader ... pClassLoaders) {
          Set<ClassLoader> tried = new HashSet<ClassLoader>();
          for (ClassLoader loader : findClassLoaders(pClassLoaders)) {
              // Go up the classloader stack to eventually find the server class. Sometimes the WebAppClassLoader
              // hide the server classes loaded by the parent class loader.
              while (loader != null) {
                  try {
                      if (!tried.contains(loader)) {
                          return (Class<T>) Class.forName(pClassName, pInitialize, loader);
                      }
                  } catch (ClassNotFoundException ignored) {}
                  tried.add(loader);
                  loader = loader.getParent();
              }
          }
          return null;
      }
docs: Load a certain class. Several class loader are tried: Fires the current thread's context
  class loader, then its parents. If this doesn't work, the class loader which
  loaded this class is used (and its parents)
  
  @param pClassName class name to load
  @param pInitialize whether the class must be initialized
  @param pClassLoaders optional class loaders which are tried as well
  @return the class class found or null if no class could be loaded