code: String generateSynopsis() {
          synopsisOptions = buildSynopsisOptions(opts, arg, domain);
          StringBuilder synopsisBuilder = new StringBuilder();
          if (parentName != null) {
              synopsisBuilder.append(parentName).append(" ");
          }
          synopsisBuilder.append(commandName);
          if (isOperation && !opts.isEmpty()) {
              synopsisBuilder.append("(");
          } else {
              synopsisBuilder.append(" ");
          }
          boolean hasOptions = arg != null || !opts.isEmpty();
          if (hasActions && hasOptions) {
              synopsisBuilder.append(" [");
          }
          if (hasActions) {
              synopsisBuilder.append(" <action>");
          }
          if (hasActions && hasOptions) {
              synopsisBuilder.append(" ] || [");
          }
          SynopsisOption opt;
          while ((opt = retrieveNextOption(synopsisOptions, false)) != null) {
              String content = addSynopsisOption(opt);
              if (content != null) {
                  synopsisBuilder.append(content.trim());
                  if (isOperation) {
                      if (!synopsisOptions.isEmpty()) {
                          synopsisBuilder.append(",");
                      } else {
                          synopsisBuilder.append(")");
                      }
                  }
                  synopsisBuilder.append(" ");
              }
          }
          if (hasActions && hasOptions) {
              synopsisBuilder.append(" ]");
          }
          return synopsisBuilder.toString();
      }
docs: main class entry point.