code: public static <T> List<T> removeDuplicates(final List<T> list) {
          final List<Class> registered = Lists.newArrayList();
          final Iterator it = list.iterator();
          while (it.hasNext()) {
              final Class type = it.next().getClass();
              if (registered.contains(type)) {
                  it.remove();
              } else {
                  registered.add(type);
              }
          }
          return list;
      }
docs: Remove duplicates in list by rule: only one instance of type must be present in list.
  
  @param list bundles list
  @param <T>  required bundle type
  @return list cleared from duplicates