private CompletionKind determineKind(String optionContext) {
		String[] options = optionContext.split(" ");
		for (String option : options) {
			if (option.startsWith(COMPLETION_CONTEXT_PREFIX)) {
				return CompletionKind.valueOf(option.substring(COMPLETION_CONTEXT_PREFIX.length()));
			}
		}
		throw new IllegalStateException("Could not determine kind: " + optionContext);
	}
Reads the {@link Converter#NB_INVOCATIONS_OPTION_CONTEXT_PREFIX} information and determines how many
times the user has pressed the TAB key.
spring-xd-shell/src/main/java/org/springframework/xd/shell/converter/CompletionConverter.java