code: private static boolean isLoadable(Class<?> clazz, ClassLoader classLoader) {
          try {
              return (clazz == classLoader.loadClass(clazz.getName()));
              // Else: different class with same name found
          } catch (ClassNotFoundException ex) {
              // No corresponding class found at all
              return false;
          }
      }
docs: Check whether the given class is loadable in the given ClassLoader.
  
  @param clazz the class to check (typically an interface)
  @param classLoader the ClassLoader to check against
  @return true if the given class is loadable; otherwise false
  @since 6.0.0