public Graph < Node > moduleGraph ( ) { Graph . Builder < Node > builder = new Graph . Builder <> ( ) ; archives ( ) . stream ( ) . forEach ( m -> { Node u = new Node ( m . getName ( ) , Info . REQUIRES ) ; builder . addNode ( u ) ; analyzer . requires ( m ) . map ( req -> new Node ( req . getName ( ) , Info . REQUIRES ) ) . forEach ( v -> builder . addEdge ( u , v ) ) ; } ) ; return builder . build ( ) ; }
Returns a graph of module dependences .