1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package io.github.tonywasher.joceanus.themis.xanalysis.solver.proj;
18
19 import io.github.tonywasher.joceanus.themis.xanalysis.parser.ThemisXAnalysisParser;
20 import io.github.tonywasher.joceanus.themis.xanalysis.parser.proj.ThemisXAnalysisModule;
21 import io.github.tonywasher.joceanus.themis.xanalysis.parser.proj.ThemisXAnalysisProject;
22 import io.github.tonywasher.joceanus.themis.xanalysis.solver.proj.ThemisXAnalysisSolverDef.ThemisXAnalysisSolverProjectDef;
23
24 import java.util.ArrayList;
25 import java.util.List;
26
27
28
29
30 public class ThemisXAnalysisSolverProject
31 implements ThemisXAnalysisSolverProjectDef {
32
33
34
35 private final ThemisXAnalysisParser theParser;
36
37
38
39
40 private final ThemisXAnalysisProject theProject;
41
42
43
44
45 private final List<ThemisXAnalysisSolverModule> theModules;
46
47
48
49
50
51
52 public ThemisXAnalysisSolverProject(final ThemisXAnalysisParser pParser) {
53
54 theParser = pParser;
55 theProject = theParser.getProject();
56
57
58 theModules = new ArrayList<>();
59
60
61 for (ThemisXAnalysisModule myModule : theProject.getModules()) {
62 theModules.add(new ThemisXAnalysisSolverModule(this, myModule));
63 }
64 }
65
66
67
68
69
70
71 public ThemisXAnalysisParser getProjectParser() {
72 return theParser;
73 }
74
75 @Override
76 public ThemisXAnalysisProject getUnderlyingProject() {
77 return theProject;
78 }
79
80
81
82
83
84
85 public List<ThemisXAnalysisSolverModule> getModules() {
86 return theModules;
87 }
88
89 @Override
90 public String toString() {
91 return theProject.toString();
92 }
93 }