Skip to content

Commit a7684fe

Browse files
committed
add support input dir
1 parent 955d9ef commit a7684fe

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/main/java/org/clyze/doop/common/Parameters.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,22 @@ protected int processNextArg(String[] args, int i) throws DoopErrorCodeException
161161
i = shift(args, i);
162162
_inputs.add(args[i]);
163163
break;
164+
case "-idir":
165+
i = shift(args, i);
166+
File inputDir = new File(args[i]);
167+
File[] files = inputDir.listFiles();
168+
if (files != null) {
169+
for (File file : files) {
170+
if (file.getName().endsWith(".jar")) {
171+
try{
172+
_inputs.add(file.getCanonicalPath());
173+
}catch (Exception e){
174+
e.printStackTrace();
175+
}
176+
}
177+
}
178+
}
179+
break;
164180
case "-l":
165181
i = shift(args, i);
166182
_platformLibs.add(args[i]);

src/main/java/org/clyze/doop/soot/SootParameters.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static void showHelp() {
9090
System.err.println(" --allow-phantom Allow phantom classes.");
9191
System.err.println(" -d <directory> Specify where to generate output fact files.");
9292
System.err.println(" -i <archive> Find classes in <archive>.");
93+
System.err.println(" -idir <directory> Find classes/jar in <directory>.");
9394
System.err.println(" -l <archive> Find library classes in <archive>.");
9495
System.err.println(" -ld <archive> Find dependency classes in <archive>.");
9596
System.err.println(" -lsystem Find classes in default system classes.");

0 commit comments

Comments
 (0)