docs: public void setIdentifierResolver(final Object identifierResolver) {
          if (identifierResolver instanceof IdentifierResolver) {
              this.identifierResolver = (IdentifierResolver) identifierResolver;
          } else if (identifierResolver instanceof String) {
              this.identifierResolver = new IdentifierResolver() {
                  public String getIdentifierFor(String nodeName) {
                      return (String) identifierResolver;
                  }
              };
          } else if (identifierResolver instanceof Closure) {
              final ObjectGraphBuilder self = this;
              this.identifierResolver = new IdentifierResolver() {
                  public String getIdentifierFor(String nodeName) {
                      Closure cls = (Closure) identifierResolver;
                      cls.setDelegate(self);
                      return (String) cls.call(new Object[]{nodeName});
                  }
              };
          } else {
              this.identifierResolver = new DefaultIdentifierResolver();
          }
      }