public static boolean hasAllStepsOfClass(final Traversal.Admin<?, ?> traversal, final Class<?>... classesToCheck) {
        for (final Step step : traversal.getSteps()) {
            boolean foundInstance = false;
            for (final Class<?> classToCheck : classesToCheck) {
                if (classToCheck.isInstance(step)) {
                    foundInstance = true;
                    break;
                }
            }
            if (!foundInstance)
                return false;
        }
        return true;
    }
Returns the name of <i>step</i> truncated to <i>maxLength</i>. An ellipses is appended when the name exceeds
<i>maxLength</i>.

@param step
@param maxLength Includes the 3 "..." characters that will be appended when the length of the name exceeds
                 maxLength.
@return short step name.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/TraversalHelper.java