private void listElements(Set<Object> elements, Set<Attribute<?, ?>> attributes, ConfigurationContext context) {
        attributes.stream()
                .map(Attribute::getType)
                .map(context::lookup)
                .filter(Objects::nonNull)
                .map(c -> c.getConfigurators(context))
                .flatMap(Collection::stream)
                .forEach(configurator -> {
                    if (elements.add(configurator)) {
                        listElements(
                                elements,
                                ((Configurator) configurator).describe(),
                                context); // some unexpected type erasure force to cast here
                    }
                });
    }
Recursive configurators tree walk (DFS).
Collects all configurators starting from root ones in {@link #getConfigurators()}
 @param elements   linked set (to save order) of visited elements
@param attributes siblings to find associated configurators and dive to next tree levels
@param context
plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java