public static Type[] getParameterTypes(Executable executable, Type declaringType) {
    Type[] parameterTypes = GenericTypeReflector.getParameterTypes(executable, declaringType);
    for (int i = 0; i < parameterTypes.length; i++) {
      parameterTypes[i] = resolveTypeVariableWithBound(parameterTypes[i]);
    }
    return parameterTypes;
  }
Resolves the parameter types of the given method/constructor in the given type, with the method {@link GenericTypeReflector#getParameterTypes(Executable, Type)}.

<p>In difference to the method of the library, this method will resolve unknown {@link java.lang.reflect.TypeVariable}s to the upper bound of the type variable.

@param executable    the executable code for which the parameter types shall be resolved
@param declaringType the declaring type of the {@code executable}
@return the resolved types of the parameters
spock-core/src/main/java/org/spockframework/util/GenericTypeReflectorUtil.java