public static <T extends Closure<?>> T instantiateClosure(Class<T> closureType, Object owner, Object thisObject) {
    try {
      Constructor<T> constructor = closureType.getConstructor(Object.class, Object.class);
      return constructor.newInstance(owner, thisObject);
    } catch (Exception e) {
      return ExceptionUtil.sneakyThrow(e.getCause());
    }
  }
Note: This method may throw checked exceptions although it doesn't say so.
spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java