String getSyntaxString(String commandName, Annotation[][] annotations, Class[] parameterTypes) {
    StringBuilder buffer = new StringBuilder();
    buffer.append(commandName);
    for (int i = 0; i < annotations.length; i++) {
      CliOption cliOption = getAnnotation(annotations[i], CliOption.class);
      String optionString = getOptionString(cliOption, parameterTypes[i]);
      if (cliOption.mandatory()) {
        buffer.append(" ").append(optionString);
      } else {
        buffer.append(" [").append(optionString).append("]");
      }
    }
    return buffer.toString();
  }
returns a short description and help string of the command if annotations is null or returns a
details description of the command with the syntax and parameter description
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/help/Helper.java