private List<Module> createModules() {
    List<Module> modules = new ArrayList<>();
    for (Class<? extends Module> clazz : moduleClasses) {
      try {
        modules.add(clazz.newInstance());
      } catch (InstantiationException | IllegalAccessException e) {
        throw new GuiceExtensionException("Failed to instantiate module '%s'", e).withArgs(clazz.getSimpleName());
      }
    }
    return modules;
  }
Creates a Guice injector, and injects Guice-provided objects into specifications.

@author Peter Niederwieser
spock-guice/src/main/java/org/spockframework/guice/GuiceInterceptor.java