code: public static Class<?> findLoadedClass(String className, ClassLoader classLoader) {
          checkArgNotNull(className, "className");
          checkArgNotNull(classLoader, "classLoader");
          try {
              Class<?> classLoaderBaseClass = Class.forName("java.lang.ClassLoader");
              Method findLoadedClassMethod = classLoaderBaseClass.getDeclaredMethod("findLoadedClass", String.class);
  
              // protected method invocation
              findLoadedClassMethod.setAccessible(true);
              try {
                  return (Class<?>) findLoadedClassMethod.invoke(classLoader, className);
              } finally {
                  findLoadedClassMethod.setAccessible(false);
              }
          } catch (Exception e) {
              throw new RuntimeException("Could not determine whether class '" + className +
                      "' has already been loaded", e);
          }
      }
docs: Returns the class with the given name if it has already been loaded by the given class loader.
  Otherwise the method returns null.
  
  @param className   the full name of the class to be loaded
  @param classLoader the class loader to use
  @return the class instance or null