public void accept()

in junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/ValueArgumentsProvider.java [33:60]


	public void accept(ValueSource source) {
		// @formatter:off
		List<Object> arrays =
				// Declaration of <Object> is necessary due to a bug in Eclipse Photon.
				Stream.<Object> of(
					source.shorts(),
					source.bytes(),
					source.ints(),
					source.longs(),
					source.floats(),
					source.doubles(),
					source.chars(),
					source.booleans(),
					source.strings(),
					source.classes()
				)
				.filter(array -> Array.getLength(array) > 0)
				.collect(toList());
		// @formatter:on

		Preconditions.condition(arrays.size() == 1, () -> "Exactly one type of input must be provided in the @"
				+ ValueSource.class.getSimpleName() + " annotation, but there were " + arrays.size());

		Object originalArray = arrays.get(0);
		arguments = IntStream.range(0, Array.getLength(originalArray)) //
				.mapToObj(index -> Array.get(originalArray, index)) //
				.toArray();
	}