/** * Used to add an edge to the call graph. Returns true iff the edge was not already present. */ public boolean addEdge(Edge e) { if (!edges.add(e)) { return false; } stream.add(e); Edge position = null; position = srcUnitToEdge.get(e.srcUnit()); if (position == null) { srcUnitToEdge.put(e.srcUnit(), e); position = dummy; } e.insertAfterByUnit(position); position = srcMethodToEdge.get(e.getSrc()); if (position == null) { srcMethodToEdge.put(e.getSrc(), e); position = dummy; } e.insertAfterBySrc(position); position = tgtToEdge.get(e.getTgt()); if (position == null) { tgtToEdge.put(e.getTgt(), e); position = dummy; } e.insertAfterByTgt(position); return true; }
/** Used to add an edge to the call graph. Returns true iff the edge was * not already present. */ public boolean addEdge( Edge e ) { if( !edges.add( e ) ) return false; stream.add( e ); Edge position = null; position = srcUnitToEdge.get( e.srcUnit() ); if( position == null ) { srcUnitToEdge.put( e.srcUnit(), e ); position = dummy; } e.insertAfterByUnit( position ); position = srcMethodToEdge.get( e.getSrc() ); if( position == null ) { srcMethodToEdge.put( e.getSrc(), e ); position = dummy; } e.insertAfterBySrc( position ); position = tgtToEdge.get( e.getTgt() ); if( position == null ) { tgtToEdge.put( e.getTgt(), e ); position = dummy; } e.insertAfterByTgt( position ); return true; } /** Removes the edge e from the call graph. Returns true iff the edge
/** Used to add an edge to the call graph. Returns true iff the edge was * not already present. */ public boolean addEdge( Edge e ) { if( !edges.add( e ) ) return false; stream.add( e ); Edge position = null; position = srcUnitToEdge.get( e.srcUnit() ); if( position == null ) { srcUnitToEdge.put( e.srcUnit(), e ); position = dummy; } e.insertAfterByUnit( position ); position = srcMethodToEdge.get( e.getSrc() ); if( position == null ) { srcMethodToEdge.put( e.getSrc(), e ); position = dummy; } e.insertAfterBySrc( position ); position = tgtToEdge.get( e.getTgt() ); if( position == null ) { tgtToEdge.put( e.getTgt(), e ); position = dummy; } e.insertAfterByTgt( position ); return true; } /** Removes the edge e from the call graph. Returns true iff the edge