public static boolean hasStepOfAssignableClass(final Class superClass, final Traversal.Admin<?, ?> traversal) {
        for (final Step<?, ?> step : traversal.getSteps()) {
            if (superClass.isAssignableFrom(step.getClass())) {
                return true;
            }
        }
        return false;
    }
Determine if the traversal has a step of an assignable class.

@param superClass the step super class to look for
@param traversal  the traversal to perform the action on
@return {@code true} if the class is found and {@code false} otherwise
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java