@Override public Collection<T> getExceptionalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateExceptionalPredecessors(b)); }
/** * 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)); }
/** * 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 Collection<T> getExceptionalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateExceptionalPredecessors(b)); }
@Override public Collection<T> getNormalPredecessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateNormalPredecessors(b)); }
/** * Compute the nodes to visualize */ private static <T> Collection<T> computeDotNodes(Graph<T> g) { return Iterator2Collection.toSet(g.iterator()); }
/** * @throws NullPointerException if instances is null */ public static <T> Collection<T> toCollection(OrdinalSet<T> instances) { return Iterator2Collection.toSet(instances.iterator()); }
/** * Compute the nodes to visualize */ private static <T> Collection<T> computeDotNodes(Graph<T> g) { return Iterator2Collection.toSet(g.iterator()); }
/** * 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 Collection<T> getNormalSuccessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateNormalSuccessors(b.getNumber())); }
@Override public Collection<T> getNormalSuccessors(T b) { if (b == null) { throw new IllegalArgumentException("b is null"); } return Iterator2Collection.toSet(iterateNormalSuccessors(b.getNumber())); }
@Override public Iterator<T> getSuccNodes(T N) { Collection<T> succs = HashSetFactory.make(); for (U label : nodeToSuccLabels.get(N)) { succs.addAll(Iterator2Collection.toSet(getSuccNodes(N, label))); } return succs.iterator(); }
@Override public Iterator<T> getSuccNodes(T N) { Collection<T> succs = HashSetFactory.make(); for (U label : nodeToSuccLabels.get(N)) { succs.addAll(Iterator2Collection.toSet(getSuccNodes(N, label))); } return succs.iterator(); }
@Override public Iterator<T> getPredNodes(T N) { Collection<T> preds = HashSetFactory.make(); for (U label : nodeToPredLabels.get(N)) { preds.addAll(Iterator2Collection.toSet(getPredNodes(N, label))); } return preds.iterator(); }
@Override public Iterator<T> getPredNodes(T N) { Collection<T> preds = HashSetFactory.make(); for (U label : nodeToPredLabels.get(N)) { preds.addAll(Iterator2Collection.toSet(getPredNodes(N, label))); } return preds.iterator(); }
@Override public Iterator<T> getPredNodes(T N) { Collection<T> preds = HashSetFactory.make(); for (U label : nodeToPredLabels.get(N)) { preds.addAll(Iterator2Collection.toSet(getPredNodes(N, label))); } return preds.iterator(); }
/** * @return the classes that immediately extend klass. if klass is an array class A[][]...[], we return array classes B[][]...[] * (same dimensionality) where B is an immediate subclass of A. If A is primitive, we return the empty set. */ @Override public Collection<IClass> getImmediateSubclasses(IClass klass) { if (klass.isArrayClass()) { return getImmediateArraySubclasses((ArrayClass)klass); } Function<Node, IClass> node2Class = n -> n.klass; return Iterator2Collection.toSet(new MapIterator<>(findNode(klass).children.iterator(), node2Class)); }
/** * @return the classes that immediately extend klass. if klass is an array class A[][]...[], we return array classes B[][]...[] * (same dimensionality) where B is an immediate subclass of A. If A is primitive, we return the empty set. */ @Override public Collection<IClass> getImmediateSubclasses(IClass klass) { if (klass.isArrayClass()) { return getImmediateArraySubclasses((ArrayClass)klass); } Function<Node, IClass> node2Class = n -> n.klass; return Iterator2Collection.toSet(new MapIterator<>(findNode(klass).children.iterator(), node2Class)); }
@Override public Collection<ISSABasicBlock> getExceptionalPredecessors(ISSABasicBlock b) { if (b == null) { throw new IllegalArgumentException("b is null"); } IBasicBlock<IInstruction> n = delegate.getNode(b.getNumber()); Function<IBasicBlock<IInstruction>, ISSABasicBlock> f = object -> basicBlocks[delegate.getNumber(object)]; return Iterator2Collection.toSet(new MapIterator<>(delegate .getExceptionalPredecessors(n).iterator(), f)); }