1 5 package org.hammurapi.inspectors.metrics; 6 7 import java.util.Hashtable ; 8 import java.util.Vector ; 9 10 import org.w3c.dom.Document ; 11 import org.w3c.dom.Element ; 12 13 17 public class JarFileList extends Vector { 18 19 public void markUsedJarFiles(Vector techEntityList, 20 Hashtable allTechStackEntitiesTable) { 21 for (int i = 0; i < this.size(); i++) { 22 int j = 0; 23 boolean notFound = true; 24 JarFile jarFile = (JarFile) this.elementAt(i); 25 while (notFound && j < techEntityList.size()) { 26 27 TechStackEntity tse = (TechStackEntity) techEntityList.elementAt(j); 28 if (tse != null) { 29 30 if (tse.markIfPartOfJarFileList(jarFile.getJarNameWithoutPath())) { 32 jarFile.setIsUsed(true); 33 } 35 } 36 j++; 37 } 38 } 39 } 40 41 public Element toDom(Document document){ 42 43 Element jarFileListE =document.createElement("ClasspathFileLicense"); 44 45 for (int i = 0; i < this.size(); i++) { 46 int j = 0; 47 boolean notFound = true; 48 JarFile jarFile = (JarFile) this.elementAt(i); 49 jarFileListE.appendChild(jarFile.toDom(document)); 50 } 52 return jarFileListE; 53 } 54 } | Popular Tags |