private <T,U> void collectAll(List<T> accumulator, Function<SpecInfo, U> getter, BiConsumer<List<T>, U> combiner) {
    if (superSpec != null) {
      superSpec.collectAll(accumulator, getter, combiner);
    }
    U value = getter.apply(this);
    if (value != null) {
      combiner.accept(accumulator, value);
    }
  }
Runtime information about a Spock specification.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/runtime/model/SpecInfo.java