public static List<String> getAllSourceModules(List<Element> elements) {
        List<String> names = new ArrayList<>();
        for (Element element : elements) {
            if (element.getSource().getClass().isAssignableFrom(ElementSource.class)) {
                ElementSource source = (ElementSource)element.getSource();
                names.addAll(source.getModuleClassNames());
            }
        }
        return names;
    }
public static List < String > getAllSourceModules ( List < Element > elements ) { List < String > names = new ArrayList < > ( ) ; for ( Element element : elements ) { if ( element . getSource ( ) . getClass ( ) . isAssignableFrom ( ElementSource . class ) ) { ElementSource source = ( ElementSource ) element . getSource ( ) ; names . addAll ( source . getModuleClassNames ( ) ) ; } } return names ; }
@param elements List of elements
@return List all Module classes that were involved in setting up bindings for the list of Elements