-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVbsCodeObjectConstructor.java
More file actions
45 lines (32 loc) · 1.1 KB
/
VbsCodeObjectConstructor.java
File metadata and controls
45 lines (32 loc) · 1.1 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.io.*;
public class VbsCodeObjectConstructor {
public static void main(String... args) throws IOException
{
String fileName = args[0];
VbsCodeObjectConstructor test = new VbsCodeObjectConstructor(fileName);
System.out.print(test.get_codeString());
}
public VbsCodeObjectConstructor(String aFileName) throws IOException {
set_fileName(aFileName);
set_codeString(FileReader.readFile(aFileName));
// now that we have the code in string format, we can extract the classes etc.
VBScriptCodeStructure vbscriptCodeStructure = new VBScriptCodeStructure();
ClassExtractor classExtractor = new ClassExtractor();
classExtractor.code = get_codeString();
vbscriptCodeStructure.Add("classes", classExtractor.Extract());
}
public String get_fileName() {
return _fileName;
}
public void set_fileName(String _fileName) {
this._fileName = _fileName;
}
public String get_codeString() {
return _codeString;
}
public void set_codeString(String _codeString) {
this._codeString = _codeString;
}
private String _codeString = null;
private String _fileName = null;
}