View Javadoc
1 /*** 2 * Main.java 3 * Project: Dependency Tool 4 * 5 * Copyright 2003 ELCA Informatique SA 6 * Av. de la Harpe 22-24, 1000 Lausanne 13, Switzerland 7 * www.elca.ch 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public License 11 * as published by the Free Software Foundation; either version 2.1 of 12 * the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, but 15 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 * USA 23 */ 24 25 package dptool.config; 26 27 import java.io.File; 28 import java.util.HashMap; 29 import java.util.Iterator; 30 import java.util.List; 31 import java.util.TreeSet; 32 33 /*** 34 * Describe class <code>Main</code> here. 35 * 36 * @author Peter Moosmann 37 * @version 0.1-alpha 38 * @version $Id$ 39 */ 40 public class Main 41 { 42 43 public static void main(String[] args) throws Exception 44 { 45 46 PackageListReader plReader = new PackageListReader(); 47 48 File[] fileList = null; 49 50 do 51 { 52 fileList = plReader.getJarFileList(); 53 } 54 while (fileList == null); 55 56 String[] packages = plReader.getPackagesFromJarFiles(fileList); 57 58 PerspectiveReader psReader = new PerspectiveReader(); 59 60 psReader.readPackageLayerData(); 61 62 String[] layers = psReader.getLayers(); 63 HashMap map = psReader.getPackageLayerData(); 64 65 for (int i=0; i < packages.length; i++) 66 { 67 if (!map.containsKey(packages[i])) 68 { 69 map.put(packages[i],"<unassigned>"); 70 } 71 } 72 73 String[][] packageLayerData = new String[map.size()][2]; 74 Iterator it = map.keySet().iterator(); 75 76 for (int i=0; i < packageLayerData.length; i++) 77 { 78 String key = (String) it.next(); 79 packageLayerData[i][0] = key; 80 packageLayerData[i][1] = (String) map.get(key); 81 } 82 83 List filters = psReader.getFilters(); 84 List aggregators = psReader.getAggregators(); 85 86 LayerGui(packageLayerData, layers, filters, aggregators)/package-summary.html">>new LayerGui(packageLayerData, layers, filters, aggregators); 87 88 } 89 }

This page was automatically generated by Maven