code: String getUniqueName(CharSequence base) {
      String name = base.toString();
      for (int differentiator = 1; isInvalidName(name); differentiator++) {
        name = base.toString() + separator + differentiator;
      }
      return name;
    }
docs: Generates a unique and valid name using {@code base}. If {@code base} has not yet been added,
  and is not a Java keyword; it will be returned as-is, otherwise it will have a differentiator
  appended.