code: public SafeHtmlBuilder setType(String value) {
      if (!TYPE_STRING_ELEMENT_WHITELIST.contains(elementName)) {
        throw new IllegalArgumentException(
            "Attribute \"type\" with a String value can only be used "
                + "by one of the following elements: "
                + TYPE_STRING_ELEMENT_WHITELIST);
      }
      return setAttribute("type", value);
    }
docs: Sets the {@code type} attribute for this element.
  
  <p>The attribute {@code type} with a {@code String} value is allowed on these elements:
  
  <ul>
  <li>{@code button}
  <li>{@code command}
  <li>{@code input}
  <li>{@code li}
  <li>{@code link}
  <li>{@code ol}
  </ul>
  
  @throws IllegalArgumentException if the {@code type} attribute with a {@code String} value is
  not allowed on this element