private static IMockabilityResult checkIfClassIsVisible(Class<?> mockType, ClassLoader classLoader) {
    if (!ReflectionUtil.isClassVisibleInClassloader(mockType, classLoader)) {
      return () -> "The class " + mockType.getName() + " is not visible by the classloader " + classLoader + ".";
    }
    return IMockabilityResult.MOCKABLE;
  }
Checks if the classes required for the {@code settings} are visible by the {@link ClassLoader}.

@param settings the mock settings
@return the {@link IMockabilityResult}, if it is mockable
spock-core/src/main/java/org/spockframework/mock/runtime/JavaProxyMockMaker.java