@Override public int hashCode() { return getDelegate().hashCode(); } }
@Override public Collection<T> getExceptionalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateExceptionalPredecessors(b)); }
@Test public void testFunctionDotCall() throws IOException, IllegalArgumentException, CancelException, WalaException { CallGraph cg = JSCallGraphBuilderUtil.makeScriptCG("tests", "function_call.js"); for (CGNode n : cg) { if (n.getMethod().getName().toString().equals("call4")) { Assert.assertEquals(2, cg.getSuccNodeCount(n)); // ugh List<CGNode> succs = Iterator2Collection.toList(cg.getSuccNodes(n)); Assert .assertEquals( "[Node: <Code body of function Lfunction_call.js/foo> Context: Everywhere, Node: <Code body of function Lfunction_call.js/bar> Context: Everywhere]", succs.toString()); } } }
/** * Compute the nodes to visualize */ private static <T> Collection<T> computeDotNodes(Graph<T> g) { return Iterator2Collection.toSet(g.iterator()); }
@Override public Collection<T> getNormalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateNormalPredecessors(b)); }
@Override public int hashCode() { return getDelegate().hashCode(); } }
/** * Unwrap a Collection of WithState<T> objects, returning a Collection containing the wrapped objects */ private static <T> Collection<T> removeStates(final Collection<? extends WithState<T>> p2SetWithStates) { if (p2SetWithStates == null) { throw new IllegalArgumentException("p2SetWithStates == null"); } Collection<T> finalP2Set = Iterator2Collection.toSet(new MapIterator<WithState<T>, T>(p2SetWithStates.iterator(), WithState::getWrapped)); return finalP2Set; }
@Override public int hashCode() { return getDelegate().hashCode(); } }
/** * @throws NullPointerException if instances is null */ public static <T> Collection<T> toCollection(OrdinalSet<T> instances) { return Iterator2Collection.toSet(instances.iterator()); }
@Override public String toString() { return getDelegate().toString(); }
/** * Compute the nodes to visualize */ private static <T> Collection<T> computeDotNodes(Graph<T> g) { return Iterator2Collection.toSet(g.iterator()); }
@Override public void clear() { getDelegate().clear(); }
/** * Unwrap a Collection of WithState<T> objects, returning a Collection containing the wrapped objects */ private static <T> Collection<T> removeStates(final Collection<? extends WithState<T>> p2SetWithStates) { if (p2SetWithStates == null) { throw new IllegalArgumentException("p2SetWithStates == null"); } Collection<T> finalP2Set = Iterator2Collection.toSet(new MapIterator<WithState<T>, T>(p2SetWithStates.iterator(), WithState::getWrapped)); return finalP2Set; }
@Override public Object[] toArray() { return getDelegate().toArray(); }
@Override public Collection<T> getExceptionalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateExceptionalPredecessors(b)); }
@Override public boolean remove(Object arg0) { return getDelegate().remove(arg0); }
@Override public Collection<T> getNormalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateNormalPredecessors(b)); }
@Override public int size() { return getDelegate().size(); }
/** * Compute the nodes to visualize */ private static <T> Collection<T> computeDotNodes(Graph<T> g) { return Iterator2Collection.toSet(g.iterator()); }
@Override public boolean equals(Object o) { return getDelegate().equals(o); }