public static Object[] toComponents(final Record record) {
		try {
			final var components = record.getClass().getRecordComponents();
			final var elements = new Object[components.length];
			for (int i = 0; i < elements.length; ++i) {
				elements[i] = components[i].getAccessor().invoke(record);
			}

			return elements;
		} catch (ReflectiveOperationException e) {
			throw new IllegalArgumentException(e);
		}
	}
Converts the given {@code record} into its components.

@param record the record to convert
@return the record components
jenetics.ext/src/main/java/io/jenetics/ext/util/CsvSupport.java