@Override
  public final int parseArguments(final Parameters params) throws CmdLineException {
    String templateName = params.getParameter(0);

    try {
      KeyTemplate template = TinkeyKeyTemplates.get().get(templateName);
      // If cannot find the template in Tinkey, look it up in the main registry
      if (template == null) {
        template = KeyTemplates.get(templateName);
      }
      setter.addValue(template);
      return 1;
    } catch (GeneralSecurityException ex) {
      throw new CmdLineException(owner, ex.getMessage(), ex);
    }
  }
A {@code OptionHandle} that can handle {@code KeyTemplate} in text format.
tools/tinkey/src/main/java/com/google/crypto/tink/tinkey/KeyTemplateHandler.java