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 findCommonInterfaces(Type type) { Map typeMap = getAllInterfaces(type.clazz, null); Map thisMap = getAllInterfaces(this.clazz, null); 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); }
private Map<String,CtClass> findCommonInterfaces(Type type) { Map<String,CtClass> typeMap = getAllInterfaces(type.clazz, null); Map<String,CtClass> thisMap = getAllInterfaces(this.clazz, null); return findCommonInterfaces(typeMap, thisMap); }
private Type mergeClasses(Type type) throws NotFoundException { CtClass superClass = findCommonSuperClass(this.clazz, type.clazz); // If its Object, then try and find a common interface(s) if (superClass.getSuperclass() == null) { Map interfaces = findCommonInterfaces(type); if (interfaces.size() == 1) return new Type((CtClass) interfaces.values().iterator().next()); if (interfaces.size() > 1) return new MultiType(interfaces); // Only Object is in common return new Type(superClass); } // Check for a common interface that is not on the found supertype Map commonDeclared = findExclusiveDeclaredInterfaces(type, superClass); if (commonDeclared.size() > 0) { return new MultiType(commonDeclared, new Type(superClass)); } return new Type(superClass); }
private Type mergeClasses(Type type) throws NotFoundException { CtClass superClass = findCommonSuperClass(this.clazz, type.clazz); // If its Object, then try and find a common interface(s) if (superClass.getSuperclass() == null) { Map<String,CtClass> interfaces = findCommonInterfaces(type); if (interfaces.size() == 1) return new Type((CtClass) interfaces.values().iterator().next()); if (interfaces.size() > 1) return new MultiType(interfaces); // Only Object is in common return new Type(superClass); } // Check for a common interface that is not on the found supertype Map<String,CtClass> commonDeclared = findExclusiveDeclaredInterfaces(type, superClass); if (commonDeclared.size() > 0) { return new MultiType(commonDeclared, new Type(superClass)); } return new Type(superClass); }
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); }
private Map findCommonInterfaces(Type type) { Map typeMap = getAllInterfaces(type.clazz, null); Map thisMap = getAllInterfaces(this.clazz, null); return findCommonInterfaces(typeMap, thisMap); }
private Map findCommonInterfaces(Type type) { Map typeMap = getAllInterfaces(type.clazz, null); Map thisMap = getAllInterfaces(this.clazz, null); return findCommonInterfaces(typeMap, thisMap); }
private Map findCommonInterfaces(Type type) { Map typeMap = getAllInterfaces(type.clazz, null); Map thisMap = getAllInterfaces(this.clazz, null); return findCommonInterfaces(typeMap, thisMap); }
private Map findCommonInterfaces(Type type) { Map typeMap = getAllInterfaces(type.clazz, null); Map thisMap = getAllInterfaces(this.clazz, null); return findCommonInterfaces(typeMap, thisMap); }
private Type mergeClasses(Type type) throws NotFoundException { CtClass superClass = findCommonSuperClass(this.clazz, type.clazz); // If its Object, then try and find a common interface(s) if (superClass.getSuperclass() == null) { Map interfaces = findCommonInterfaces(type); if (interfaces.size() == 1) return new Type((CtClass) interfaces.values().iterator().next()); if (interfaces.size() > 1) return new MultiType(interfaces); // Only Object is in common return new Type(superClass); } // Check for a common interface that is not on the found supertype Map commonDeclared = findExclusiveDeclaredInterfaces(type, superClass); if (commonDeclared.size() > 0) { return new MultiType(commonDeclared, new Type(superClass)); } return new Type(superClass); }
private Type mergeClasses(Type type) throws NotFoundException { CtClass superClass = findCommonSuperClass(this.clazz, type.clazz); // If its Object, then try and find a common interface(s) if (superClass.getSuperclass() == null) { Map interfaces = findCommonInterfaces(type); if (interfaces.size() == 1) return new Type((CtClass) interfaces.values().iterator().next()); if (interfaces.size() > 1) return new MultiType(interfaces); // Only Object is in common return new Type(superClass); } // Check for a common interface that is not on the found supertype Map commonDeclared = findExclusiveDeclaredInterfaces(type, superClass); if (commonDeclared.size() > 0) { return new MultiType(commonDeclared, new Type(superClass)); } return new Type(superClass); }
private Type mergeClasses(Type type) throws NotFoundException { CtClass superClass = findCommonSuperClass(this.clazz, type.clazz); // If its Object, then try and find a common interface(s) if (superClass.getSuperclass() == null) { Map interfaces = findCommonInterfaces(type); if (interfaces.size() == 1) return new Type((CtClass) interfaces.values().iterator().next()); if (interfaces.size() > 1) return new MultiType(interfaces); // Only Object is in common return new Type(superClass); } // Check for a common interface that is not on the found supertype Map commonDeclared = findExclusiveDeclaredInterfaces(type, superClass); if (commonDeclared.size() > 0) { return new MultiType(commonDeclared, new Type(superClass)); } return new Type(superClass); }
private Type mergeClasses(Type type) throws NotFoundException { CtClass superClass = findCommonSuperClass(this.clazz, type.clazz); // If its Object, then try and find a common interface(s) if (superClass.getSuperclass() == null) { Map interfaces = findCommonInterfaces(type); if (interfaces.size() == 1) return new Type((CtClass) interfaces.values().iterator().next()); if (interfaces.size() > 1) return new MultiType(interfaces); // Only Object is in common return new Type(superClass); } // Check for a common interface that is not on the found supertype Map commonDeclared = findExclusiveDeclaredInterfaces(type, superClass); if (commonDeclared.size() > 0) { return new MultiType(commonDeclared, new Type(superClass)); } return new Type(superClass); }