docs: public void setClassNameResolver(final Object classNameResolver) {
          if (classNameResolver instanceof ClassNameResolver) {
              this.classNameResolver = (ClassNameResolver) classNameResolver;
          } else if (classNameResolver instanceof String) {
              this.classNameResolver = new ClassNameResolver() {
                  public String resolveClassname(String classname) {
                      return makeClassName((String) classNameResolver, classname);
                  }
              };
          } else if (classNameResolver instanceof Closure) {
              final ObjectGraphBuilder self = this;
              this.classNameResolver = new ClassNameResolver() {
                  public String resolveClassname(String classname) {
                      Closure cls = (Closure) classNameResolver;
                      cls.setDelegate(self);
                      return (String) cls.call(new Object[]{classname});
                  }
              };
          } else if (classNameResolver instanceof Map) {
              Map classNameResolverOptions = (Map) classNameResolver;
  
              String resolverName = (String) classNameResolverOptions.get(CLASSNAME_RESOLVER_KEY);
  
              if (resolverName == null) {
                  throw new RuntimeException("key '" + CLASSNAME_RESOLVER_KEY + "' not defined");
              }
  
              if (CLASSNAME_RESOLVER_REFLECTION.equals(resolverName)) {
                  String root = (String) classNameResolverOptions.get(CLASSNAME_RESOLVER_REFLECTION_ROOT);
  
                  if (root == null) {
                      throw new RuntimeException("key '" + CLASSNAME_RESOLVER_REFLECTION_ROOT + "' not defined");
                  }
  
                  this.classNameResolver = new ReflectionClassNameResolver(root);
              } else {
                  throw new RuntimeException("unknown class name resolver " + resolverName);
              }
          } else {
              this.classNameResolver = new DefaultClassNameResolver();
          }
      }