code: public void setGenerator(final IdGenerator generator) {
          if (generator != null) {
              this.idGenerator = generator;
              swidTag.setId(idGenerator.nextId());
          }
      }
docs: Set element identifier generator.
  
  @param generator
  element identifier generator