public List<ParameterInfo> getParameters() {
    if (parameters == null) {
      Function<Integer, String> nameProvider = getNameProvider();
      Parameter[] params = getReflection().getParameters();
      List<ParameterInfo> result = new ArrayList<>(params.length);
      for (int i = 0; i < params.length; i++) {
        result.add(new ParameterInfo(this, nameProvider.apply(i), params[i], i));
      }
      parameters = Collections.unmodifiableList(result);
    }
    return parameters;
  }
Runtime information about a method in a Spock specification.

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