public <S> Object[] getKeyValues(final Traverser.Admin<S> traverser, final Object... exceptKeys) {
        if (this.parameters.isEmpty()) return EMPTY_ARRAY;
        final List<Object> keyValues = new ArrayList<>();
        for (final Map.Entry<Object, List<Object>> entry : this.parameters.entrySet()) {
            if (!ArrayUtils.contains(exceptKeys, entry.getKey())) {
                for (final Object value : entry.getValue()) {
                    keyValues.add(resolve(entry.getKey(), traverser));
                    keyValues.add(resolve(value, traverser));
                }
            }
        }
        return keyValues.toArray(new Object[keyValues.size()]);
    }
Gets the array of keys/values of the parameters while resolving parameter values that contain
{@link Traversal} or {@link GValue} instances.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java