Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 25 package classycle; 26 27 28 29 35 public class AnalyserCommandLine extends CommandLine 36 { 37 private static final String XML_FILE = "-xmlFile="; 38 private static final String CSV_FILE = "-csvFile="; 39 private static final String TITLE = "-title="; 40 private boolean _packagesOnly; 41 private boolean _raw; 42 private boolean _cycles; 43 private boolean _strong; 44 private String _title; 45 private String _xmlFile; 46 private String _csvFile; 47 public AnalyserCommandLine(String [] args) 48 { 49 super(args); 50 if (_title == null && _classFiles.length > 0) 51 { 52 _title = _classFiles[0]; 53 } 54 } 55 56 protected void handleOption(String argument) 57 { 58 if (argument.equals("-raw")) 59 { 60 _raw = true; 61 } else if (argument.equals("-packagesOnly")) 62 { 63 _packagesOnly = true; 64 } else if (argument.equals("-cycles")) 65 { 66 _cycles = true; 67 } else if (argument.equals("-strong")) 68 { 69 _strong = true; 70 } else if (argument.startsWith(TITLE)) 71 { 72 _title = argument.substring(TITLE.length()); 73 if (_title.length() == 0) 74 { 75 _valid = false; 76 } 77 } else if (argument.startsWith(XML_FILE)) 78 { 79 _xmlFile = argument.substring(XML_FILE.length()); 80 if (_xmlFile.length() == 0) 81 { 82 _valid = false; 83 } 84 } else if (argument.startsWith(CSV_FILE)) 85 { 86 _csvFile = argument.substring(CSV_FILE.length()); 87 if (_csvFile.length() == 0) 88 { 89 _valid = false; 90 } 91 } else 92 { 93 super.handleOption(argument); 94 } 95 } 96 97 98 public String getUsage() 99 { 100 return "[-raw] [-packagesOnly] [-cycles|-strong] " 101 + "[" + XML_FILE + "<file>] [" + CSV_FILE + "<file>] " 102 + "[" + TITLE + "<title>] " + super.getUsage(); 103 } 104 105 106 public boolean isCycles() 107 { 108 return _cycles; 109 } 110 111 112 public boolean isPackagesOnly() 113 { 114 return _packagesOnly; 115 } 116 117 118 public boolean isRaw() 119 { 120 return _raw; 121 } 122 123 124 public boolean isStrong() 125 { 126 return _strong; 127 } 128 129 134 public String getCsvFile() 135 { 136 return _csvFile; 137 } 138 139 144 public String getTitle() 145 { 146 return _title; 147 } 148 149 154 public String getXmlFile() 155 { 156 return _xmlFile; 157 } 158 } 159
| Popular Tags
|