Beispiel #1
0
 public static void collectAllInheritedTypes(ITypeBinding type, Set<ITypeBinding> inheritedTypes) {
   collectAllInterfaces(type, inheritedTypes);
   while (true) {
     type = type.getSuperclass();
     if (type == null) {
       break;
     }
     inheritedTypes.add(type);
   }
 }
Beispiel #2
0
 /**
  * Returns a set containing bindings of all interfaces implemented by the given class, and all
  * super-interfaces of those.
  */
 public static Set<ITypeBinding> getAllInterfaces(ITypeBinding type) {
   Set<ITypeBinding> interfaces = Sets.newHashSet();
   collectAllInterfaces(type, interfaces);
   return interfaces;
 }