private Map findExclusiveDeclaredInterfaces(Type type, CtClass exclude) { Map typeMap = getDeclaredInterfaces(type.clazz, null); Map thisMap = getDeclaredInterfaces(this.clazz, null); Map excludeMap = getAllInterfaces(exclude, null); Iterator i = excludeMap.keySet().iterator(); while (i.hasNext()) { Object intf = i.next(); typeMap.remove(intf); thisMap.remove(intf); } return findCommonInterfaces(typeMap, thisMap); }
private Map<String,CtClass> findExclusiveDeclaredInterfaces(Type type, CtClass exclude) { Map<String,CtClass> typeMap = getDeclaredInterfaces(type.clazz, null); Map<String,CtClass> thisMap = getDeclaredInterfaces(this.clazz, null); Map<String,CtClass> excludeMap = getAllInterfaces(exclude, null); for (String intf:excludeMap.keySet()) { typeMap.remove(intf); thisMap.remove(intf); } return findCommonInterfaces(typeMap, thisMap); }
Map getDeclaredInterfaces(CtClass clazz, Map map) { if (map == null) map = new HashMap(); if (clazz.isInterface()) map.put(clazz.getName(), clazz); CtClass[] interfaces; try { interfaces = clazz.getInterfaces(); } catch (NotFoundException e) { throw new RuntimeException(e); } for (int i = 0; i < interfaces.length; i++) { CtClass intf = interfaces[i]; map.put(intf.getName(), intf); getDeclaredInterfaces(intf, map); } return map; }
Map<String,CtClass> getDeclaredInterfaces(CtClass clazz, Map<String,CtClass> map) { if (map == null) map = new HashMap<String,CtClass>(); if (clazz.isInterface()) map.put(clazz.getName(), clazz); CtClass[] interfaces; try { interfaces = clazz.getInterfaces(); } catch (NotFoundException e) { throw new RuntimeException(e); } for (CtClass intf:interfaces) { map.put(intf.getName(), intf); getDeclaredInterfaces(intf, map); } return map; }
private Map findExclusiveDeclaredInterfaces(Type type, CtClass exclude) { Map typeMap = getDeclaredInterfaces(type.clazz, null); Map thisMap = getDeclaredInterfaces(this.clazz, null); Map excludeMap = getAllInterfaces(exclude, null); Iterator i = excludeMap.keySet().iterator(); while (i.hasNext()) { Object intf = i.next(); typeMap.remove(intf); thisMap.remove(intf); } return findCommonInterfaces(typeMap, thisMap); }
private Map findExclusiveDeclaredInterfaces(Type type, CtClass exclude) { Map typeMap = getDeclaredInterfaces(type.clazz, null); Map thisMap = getDeclaredInterfaces(this.clazz, null); Map excludeMap = getAllInterfaces(exclude, null); Iterator i = excludeMap.keySet().iterator(); while (i.hasNext()) { Object intf = i.next(); typeMap.remove(intf); thisMap.remove(intf); } return findCommonInterfaces(typeMap, thisMap); }
private Map findExclusiveDeclaredInterfaces(Type type, CtClass exclude) { Map typeMap = getDeclaredInterfaces(type.clazz, null); Map thisMap = getDeclaredInterfaces(this.clazz, null); Map excludeMap = getAllInterfaces(exclude, null); Iterator i = excludeMap.keySet().iterator(); while (i.hasNext()) { Object intf = i.next(); typeMap.remove(intf); thisMap.remove(intf); } return findCommonInterfaces(typeMap, thisMap); }
private Map findExclusiveDeclaredInterfaces(Type type, CtClass exclude) { Map typeMap = getDeclaredInterfaces(type.clazz, null); Map thisMap = getDeclaredInterfaces(this.clazz, null); Map excludeMap = getAllInterfaces(exclude, null); Iterator i = excludeMap.keySet().iterator(); while (i.hasNext()) { Object intf = i.next(); typeMap.remove(intf); thisMap.remove(intf); } return findCommonInterfaces(typeMap, thisMap); }
Map getDeclaredInterfaces(CtClass clazz, Map map) { if (map == null) map = new HashMap(); if (clazz.isInterface()) map.put(clazz.getName(), clazz); CtClass[] interfaces; try { interfaces = clazz.getInterfaces(); } catch (NotFoundException e) { throw new RuntimeException(e); } for (int i = 0; i < interfaces.length; i++) { CtClass intf = interfaces[i]; map.put(intf.getName(), intf); getDeclaredInterfaces(intf, map); } return map; }
Map getDeclaredInterfaces(CtClass clazz, Map map) { if (map == null) map = new HashMap(); if (clazz.isInterface()) map.put(clazz.getName(), clazz); CtClass[] interfaces; try { interfaces = clazz.getInterfaces(); } catch (NotFoundException e) { throw new RuntimeException(e); } for (int i = 0; i < interfaces.length; i++) { CtClass intf = interfaces[i]; map.put(intf.getName(), intf); getDeclaredInterfaces(intf, map); } return map; }
Map getDeclaredInterfaces(CtClass clazz, Map map) { if (map == null) map = new HashMap(); if (clazz.isInterface()) map.put(clazz.getName(), clazz); CtClass[] interfaces; try { interfaces = clazz.getInterfaces(); } catch (NotFoundException e) { throw new RuntimeException(e); } for (int i = 0; i < interfaces.length; i++) { CtClass intf = interfaces[i]; map.put(intf.getName(), intf); getDeclaredInterfaces(intf, map); } return map; }
Map getDeclaredInterfaces(CtClass clazz, Map map) { if (map == null) map = new HashMap(); if (clazz.isInterface()) map.put(clazz.getName(), clazz); CtClass[] interfaces; try { interfaces = clazz.getInterfaces(); } catch (NotFoundException e) { throw new RuntimeException(e); } for (int i = 0; i < interfaces.length; i++) { CtClass intf = interfaces[i]; map.put(intf.getName(), intf); getDeclaredInterfaces(intf, map); } return map; }