code: public void resolveToStringStyle(File file, int lineIndex) {
          if (toStringStyle.equals("smart")) {
              toStringStyle = (bean.isImmutable() ? "field" : "getter");
          }
          if (toStringStyle.equals("omit") ||
                  toStringStyle.equals("getter") ||
                  toStringStyle.equals("field")) {
              return;
          }
          throw new BeanCodeGenException("Invalid toString style: " + toStringStyle +
                  " in " + getBean().getTypeRaw() + "." + getPropertyName(), file, lineIndex);
      }
docs: Resolves the toString generator.
  @param file  the file
  @param lineIndex  the line index