code: private static Object newInstance(final String className, ClassLoader cl, final boolean doFallback) throws ConfigurationError {
  
          try {
              Class<?> providerClass;
              if (cl == null) {
                  // If classloader is null Use the bootstrap ClassLoader.
                  // Thus Class.forName(String) will use the current
                  // ClassLoader which will be the bootstrap ClassLoader.
                  providerClass = Class.forName(className);
              } else {
                  try {
                      providerClass = cl.loadClass(className);
                  } catch (final ClassNotFoundException x) {
                      if (doFallback) {
                          // Fall back to current classloader
                          cl = FactoryFinder.class.getClassLoader();
                          providerClass = cl.loadClass(className);
                      } else {
                          throw x;
                      }
                  }
              }
  
              final Object instance = providerClass.newInstance();
              dPrint("created new instance of " + providerClass + " using ClassLoader: " + cl);
              return instance;
          } catch (final ClassNotFoundException x) {
              throw new ConfigurationError("Provider " + className + " not found", x);
          } catch (final Exception x) {
              throw new ConfigurationError("Provider " + className + " could not be instantiated: " + x, x);
          }
      }
docs: Create an instance of a class using the specified ClassLoader and optionally fall back to the
  current ClassLoader if not found.
  
  @param className Name of the concrete class corresponding to the service provider
  
  @param cl ClassLoader to use to load the class, null means to use the bootstrap ClassLoader
  
  @param doFallback true if the current ClassLoader should be tried as a fallback if the class
  is not found using cl