@@ -39,6 +39,7 @@ class Main {
39
39
40
40
private static final String OPTION_FORCE_OVERWRITE = "fo" ;
41
41
private static final String OPTION_LOAD_FULL_JAR = "lf" ;
42
+ private static final String OPTION_SUMMARIZE_FULL_JAR = "sf" ;
42
43
private static final String OPTION_EXCLUDE = "e" ;
43
44
private static final String OPTION_REPEAT = "r" ;
44
45
private static final String OPTION_FLOW_TIMEOUT = "ft" ;
@@ -63,7 +64,9 @@ private void initializeCommandLineOptions() {
63
64
64
65
options .addOption (OPTION_FORCE_OVERWRITE , "forceoverwrite" , false ,
65
66
"Silently overwrite summary files in output directory" );
66
- options .addOption (OPTION_LOAD_FULL_JAR , "loadfulljar" , false , "Summarizes all classes from the given JAR file" );
67
+ options .addOption (OPTION_LOAD_FULL_JAR , "loadfulljar" , false , "Loads all classes from the given JAR file" );
68
+ options .addOption (OPTION_SUMMARIZE_FULL_JAR , "summarizefulljar" , false ,
69
+ "Summarizes all classes from the given JAR file" );
67
70
options .addOption (OPTION_EXCLUDE , "exclude" , true , "Excludes the given class(es)" );
68
71
options .addOption (OPTION_REPEAT , "repeat" , true ,
69
72
"Repeats the summary generation multiple times. Useful for performance measurements." );
@@ -85,10 +88,11 @@ public void run(final String[] args) throws FileNotFoundException, XMLStreamExce
85
88
86
89
final boolean forceOverwrite = cmd .hasOption (OPTION_FORCE_OVERWRITE );
87
90
boolean loadFullJAR = cmd .hasOption (OPTION_LOAD_FULL_JAR );
91
+ boolean summarizeFullJAR = cmd .hasOption (OPTION_SUMMARIZE_FULL_JAR );
88
92
89
93
// We need proper parameters
90
94
String [] extraArgs = cmd .getArgs ();
91
- if (extraArgs .length < 2 || (extraArgs .length < 3 && !loadFullJAR )) {
95
+ if (extraArgs .length < 2 || (extraArgs .length < 3 && !summarizeFullJAR )) {
92
96
printHelpMessage ();
93
97
return ;
94
98
}
@@ -105,7 +109,7 @@ public void run(final String[] args) throws FileNotFoundException, XMLStreamExce
105
109
106
110
// Collect the classes to be analyzed from our command line
107
111
List <String > classesToAnalyze = new ArrayList <>();
108
- if (!loadFullJAR ) {
112
+ if (!summarizeFullJAR ) {
109
113
for (int i = 2 ; i < extraArgs .length ; i ++) {
110
114
if (extraArgs [i ].startsWith ("-" )) {
111
115
printHelpMessage ();
@@ -122,6 +126,7 @@ public void run(final String[] args) throws FileNotFoundException, XMLStreamExce
122
126
}
123
127
124
128
generator .getConfig ().setLoadFullJAR (loadFullJAR );
129
+ generator .getConfig ().setSummarizeFullJAR (summarizeFullJAR );
125
130
generator .getConfig ().setExcludes (excludes );
126
131
127
132
// Set optional settings
@@ -227,7 +232,7 @@ private void printHelpMessage() {
227
232
System .out .println ();
228
233
229
234
final HelpFormatter formatter = new HelpFormatter ();
230
- formatter .printHelp ("soot-infoflow-cmd <JAR File> <Output Directory> <Classes...> [OPTIONS]" , options );
235
+ formatter .printHelp ("soot-infoflow-summaries <JAR File> <Output Directory> <Classes...> [OPTIONS]" , options );
231
236
}
232
237
233
238
private static void createSummaries (SummaryGenerator generator , List <String > classesToAnalyze ,
0 commit comments