@Override
 protected void cleanup(ModuleRevision revision) {
   Generation generation = (Generation) revision.getRevisionInfo();
   generation.delete();
   if (revision.equals(getCurrentRevision())) {
     // uninstall case
     generation.getBundleInfo().delete();
   }
 }
 List<Generation> getGenerations() {
   List<Generation> result = new ArrayList<Generation>();
   ModuleRevision current = getModule().getCurrentRevision();
   result.add((Generation) current.getRevisionInfo());
   ModuleWiring wiring = current.getWiring();
   if (wiring != null) {
     List<ModuleWire> hostWires = wiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE);
     if (hostWires != null) {
       for (ModuleWire hostWire : hostWires) {
         result.add((Generation) hostWire.getRequirer().getRevisionInfo());
       }
     }
   }
   return result;
 }