code: private List<Type> pruneInterfaces(Type t) {
          ListBuffer<Type> result = new ListBuffer<>();
          for (Type t1 : types.interfaces(t)) {
              boolean shouldAdd = true;
              for (Type t2 : types.directSupertypes(t)) {
                  if (t1 != t2 && types.isSubtypeNoCapture(t2, t1)) {
                      shouldAdd = false;
                  }
              }
              if (shouldAdd) {
                  result.append(t1);
              }
          }
          return result.toList();
      }
docs: where