result.addAll(getSubinterfacesOfIncluding(si));
/** Returns a list of implementers of c, excluding itself. */ public List<SootClass> getImplementersOf(SootClass i) { i.checkLevel(SootClass.HIERARCHY); if (!i.isInterface()) { throw new RuntimeException("interface needed; got " + i); } checkState(); ArraySet<SootClass> set = new ArraySet<SootClass>(); for (SootClass c : getSubinterfacesOfIncluding(i)) { set.addAll(getDirectImplementersOf(c)); } ArrayList<SootClass> l = new ArrayList<SootClass>(); l.addAll(set); return Collections.unmodifiableList(l); }
if (classOne.isInterface()) { if (classTwo.isInterface()) { typeCompatible = h.getSubinterfacesOfIncluding(classOne).contains(classTwo) || h.getSubinterfacesOfIncluding(classTwo).contains(classOne); } else { typeCompatible = h.getImplementersOf(classOne).contains(classTwo);
/** Returns a list of subinterfaces of c, excluding itself. */ public List<SootClass> getSubinterfacesOf(SootClass c) { c.checkLevel(SootClass.HIERARCHY); if (!c.isInterface()) throw new RuntimeException("interface needed!"); checkState(); // If already cached, return the value. if (interfaceToSubinterfaces.get(c) != null) return interfaceToSubinterfaces.get(c); // Otherwise, build up the hashmap. List<SootClass> l = new ArrayList<SootClass>(); ListIterator it = interfaceToDirSubinterfaces.get(c).listIterator(); while (it.hasNext()) { l.addAll(getSubinterfacesOfIncluding((SootClass)it.next())); } interfaceToSubinterfaces.put(c, Collections.unmodifiableList(l)); return Collections.unmodifiableList(l); }
/** Returns a list of subinterfaces of c, excluding itself. */ public List<SootClass> getSubinterfacesOf(SootClass c) { c.checkLevel(SootClass.HIERARCHY); if (!c.isInterface()) throw new RuntimeException("interface needed!"); checkState(); // If already cached, return the value. if (interfaceToSubinterfaces.get(c) != null) return interfaceToSubinterfaces.get(c); // Otherwise, build up the hashmap. List<SootClass> l = new ArrayList<SootClass>(); ListIterator it = interfaceToDirSubinterfaces.get(c).listIterator(); while (it.hasNext()) { l.addAll(getSubinterfacesOfIncluding((SootClass)it.next())); } interfaceToSubinterfaces.put(c, Collections.unmodifiableList(l)); return Collections.unmodifiableList(l); }
/** Returns a list of implementers of c, excluding itself. */ public List<SootClass> getImplementersOf(SootClass i) { i.checkLevel(SootClass.HIERARCHY); if (!i.isInterface()) throw new RuntimeException("interface needed; got "+i); checkState(); Iterator<SootClass> it = getSubinterfacesOfIncluding(i).iterator(); ArraySet set = new ArraySet(); while (it.hasNext()) { SootClass c = it.next(); set.addAll(getDirectImplementersOf(c)); } ArrayList l = new ArrayList(); l.addAll(set); return Collections.unmodifiableList(l); }
/** Returns a list of implementers of c, excluding itself. */ public List<SootClass> getImplementersOf(SootClass i) { i.checkLevel(SootClass.HIERARCHY); if (!i.isInterface()) throw new RuntimeException("interface needed; got "+i); checkState(); Iterator<SootClass> it = getSubinterfacesOfIncluding(i).iterator(); ArraySet set = new ArraySet(); while (it.hasNext()) { SootClass c = it.next(); set.addAll(getDirectImplementersOf(c)); } ArrayList l = new ArrayList(); l.addAll(set); return Collections.unmodifiableList(l); }