public VariableResolverPlugin.Builder resolver(final String resolverName) {
            if (VARIABLE_RESOLVERS.containsKey(resolverName)) {
                this.variableResolverMaker = VARIABLE_RESOLVERS.get(resolverName);
            } else {
                try {
                    // Assuming resolverName is a fully qualified class name if it's not in the simple name map
                    final Class<?> clazz = Class.forName(resolverName);
                    if (VariableResolver.class.isAssignableFrom(clazz)) {
                        this.variableResolverMaker = map -> {
                            try {
                                return (VariableResolver) clazz.getConstructor(Map.class).newInstance(map);
                            } catch (Exception e) {
                                throw new RuntimeException("Error instantiating VariableResolver", e);
                            }
                        };
                    }
                } catch (ClassNotFoundException e) {
                    throw new RuntimeException("VariableResolver class not found: " + resolverName, e);
                }
            }
            return this;
        }
Sets the type of {@link VariableResolver} to use by specifying a simple class name associated with the
inner classes in that interface or a fully qualified class name. The assumption is that implementations
will allow a constructor that takes a {@code Map} which contains the bindings from the script engine context.
Implementations are can then decide how to resolve variables in the script based on that {@code Map} or some
other mechanism.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/VariableResolverPlugin.java