public static Class<?> loadFirstAvailableClass(String... classNames) {
    for (String className : classNames) {
      Class<?> clazz = loadClassIfAvailable(className);
      if (clazz != null) {
        return clazz;
      }
    }
    return null;
  }
Determines the package name without calling {@code Class.getPackage()}
(which may return null).
spock-core/src/main/java/org/spockframework/util/ReflectionUtil.java