private Class<?> tryRefreshClass(String name) throws ClassNotFoundException {
    synchronized (getClassLoadingLock(name)) {
      // Check whether the class has already been loaded:
      Class<?> clasz = findLoadedClass(name);

      if (clasz != null) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Class {} already loaded", name);
        }
      } else {
        try {
          if (LOG.isDebugEnabled()) {
            LOG.debug("Finding class: {}", name);
          }

          clasz = findClass(name);
        } catch (ClassNotFoundException cnfe) {
          // Load new jar files if any
          if (LOG.isDebugEnabled()) {
            LOG.debug("Loading new jar files, if any");
          }

          loadNewJars();

          if (LOG.isDebugEnabled()) {
            LOG.debug("Finding class again: {}", name);
          }

          clasz = findClass(name);
        }
      }

      return clasz;
    }
  }
Creates a DynamicClassLoader that can load classes dynamically from jar files under a specific
folder.
@param conf   the configuration for the cluster.
@param parent the parent ClassLoader to set.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/DynamicClassLoader.java