forked from tushartushar/DesigniteJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRegularArgumentParser.java
More file actions
30 lines (24 loc) · 996 Bytes
/
RegularArgumentParser.java
File metadata and controls
30 lines (24 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package Designite.ArgumentParser;
import Designite.utils.DJLogger;
import java.io.File;
/**
* {@code RegularArgumentParser} is a subclass of {@code ArgumentParser} that does not require any
* arguments. By default, it will use the current working directory (cwd) of the Java project
* to identify or analyze the smells in the current working project itself.
*/
public class RegularArgumentParser extends ArgumentParser {
@Override
public InputArgs parseArguments(String[] args) {
String cwd = System.getProperty("user.dir");
String inputFolderPath = String.join(File.separator, cwd, "src","Designite");
String outputFolderPath = String.join(File.separator, cwd, "output");
try {
return new InputArgs(inputFolderPath, outputFolderPath);
} catch (IllegalArgumentException ex) {
DJLogger.log(ex.getMessage());
DJLogger.log("Quitting..");
System.exit(3);
}
return null;
}
}