code: private static String tryToLoad(Class<?> type, ClassLoader loader, String... classNames) {
          final boolean trace = TraceComponent.isAnyTracingEnabled();
  
          for (String className : classNames)
              try {
                  Class<?> c = loader.loadClass(className);
                  boolean isInstance = type.isAssignableFrom(c);
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(tc, className + " is " + (isInstance ? "" : "not ") + "an instance of " + type.getName());
                  if (type.isAssignableFrom(c))
                      return className;
              } catch (ClassNotFoundException x) {
                  if (trace && tc.isDebugEnabled())
                      Tr.debug(tc, className + " not found on " + loader);
              }
          return null;
      }
docs: Attempt to load the specified class names, returning the first that successfully loads
  and is an instance of the specified type.
  
  @param type data source interface
  @param loader class loader
  @param classNames ordered list of class names to check
  @return the first class name that successfully loads and is an instance of the specified interface. Otherwise, NULL.