code: void end() {
      switch (state) {
        case OPTION:
          currentOption = context.optionWithShortName(currentValue.substring(1));
        case LONG_OPTION:
          if (state == ArgumentsInspectorState.LONG_OPTION) {
            currentOption = context.optionWithLongName(currentValue.substring(2));
          }
          if (currentOption != null && !currentOption.isMultiValue()) {
            remainingOptions.remove(currentOption);
          }
          if (currentOption == null || currentOption.isFlag()) {
            state = ArgumentsInspectorState.ARGUMENT;
          } else {
            state = ArgumentsInspectorState.OPTION_VALUE;
          }
          break;
        default:
          state = ArgumentsInspectorState.READY;
      }
      currentValue = null;
    }
docs: End the process