@SuppressWarnings("unchecked")
  private <T> Class<? extends T> loadExtensionClass(String className, Class<T> baseClass) {
    try {
      Class<?> loadedClass = ReflectionUtil.loadClass(className);
      if (!baseClass.isAssignableFrom(loadedClass)) {
        throw new ExtensionException("Failed to load extension class '%s' as it is not assignable to '%s'")
          .withArgs(className, baseClass.getName());
      }
      return (Class<? extends T>)loadedClass;
    } catch (Exception e) {
      throw new ExtensionException("Failed to load extension class '%s'", e).withArgs(className);
    }
  }
Scans class path for extension descriptors and loads the extension classes specified therein.
spock-core/src/main/java/org/spockframework/runtime/ExtensionClassesLoader.java