|
4 | 4 | package de.uka.ilkd.key.settings; |
5 | 5 |
|
6 | 6 | import java.io.File; |
7 | | -import java.util.Properties; |
8 | 7 |
|
9 | 8 | import org.jspecify.annotations.NonNull; |
| 9 | +import org.jspecify.annotations.NullMarked; |
10 | 10 | import org.jspecify.annotations.Nullable; |
11 | 11 |
|
| 12 | +@NullMarked |
12 | 13 | public class TestGenerationSettings extends AbstractSettings { |
13 | 14 | // region Default Values for option fields |
14 | 15 | private static final boolean DEFAULT_APPLYSYMBOLICEX = false; |
@@ -85,14 +86,14 @@ public TestGenerationSettings(TestGenerationSettings data) { |
85 | 86 | } |
86 | 87 |
|
87 | 88 | /** |
88 | | - * @deprecated weigl: This method seems broken. I would expect: clone() = new TGS(this) |
| 89 | + * @deprecated weigl: This method seems broken. I would expect: copy() = new TGS(this) |
89 | 90 | */ |
90 | 91 | @Deprecated(forRemoval = true) |
91 | | - public TestGenerationSettings clone(TestGenerationSettings data) { |
| 92 | + public TestGenerationSettings copy(TestGenerationSettings data) { |
92 | 93 | return new TestGenerationSettings(data); |
93 | 94 | } |
94 | 95 |
|
95 | | - public TestGenerationSettings clone() { |
| 96 | + public TestGenerationSettings copy() { |
96 | 97 | return new TestGenerationSettings(this); |
97 | 98 | } |
98 | 99 |
|
@@ -126,28 +127,6 @@ public boolean includePostCondition() { |
126 | 127 | return includePostCondition; |
127 | 128 | } |
128 | 129 |
|
129 | | - @Override |
130 | | - public void readSettings(Properties props) { |
131 | | - var prefix = "[" + CATEGORY + "]"; |
132 | | - setApplySymbolicExecution(SettingsConverter.read(props, |
133 | | - prefix + PROP_APPLY_SYMBOLIC_EXECUTION, DEFAULT_APPLYSYMBOLICEX)); |
134 | | - setMaxUnwinds(SettingsConverter.read(props, prefix + PROP_MAX_UWINDS, DEFAULT_MAXUNWINDS)); |
135 | | - setOutputPath(SettingsConverter.read(props, prefix + PROP_OUTPUT_PATH, DEFAULT_OUTPUTPATH)); |
136 | | - setRemoveDuplicates(SettingsConverter.read(props, |
137 | | - prefix + PROP_REMOVE_DUPLICATES, DEFAULT_REMOVEDUPLICATES)); |
138 | | - setRFL(SettingsConverter.read(props, prefix + PROP_USE_RFL, DEFAULT_USERFL)); |
139 | | - setUseJunit(SettingsConverter.read(props, prefix + PROP_USE_JUNIT, DEFAULT_USEJUNIT)); |
140 | | - setConcurrentProcesses(SettingsConverter.read(props, |
141 | | - prefix + PROP_CONCURRENT_PROCESSES, DEFAULT_CONCURRENTPROCESSES)); |
142 | | - setInvariantForAll(SettingsConverter.read(props, |
143 | | - prefix + PROP_INVARIANT_FOR_ALL, DEFAULT_INVARIANTFORALL)); |
144 | | - setOpenjmlPath( |
145 | | - SettingsConverter.read(props, prefix + PROP_OPENJML_PATH, DEFAULT_OPENJMLPATH)); |
146 | | - setObjenesisPath(SettingsConverter.read(props, PROP_OBJENESIS_PATH, DEFAULT_OBJENESISPATH)); |
147 | | - setIncludePostCondition(SettingsConverter.read(props, |
148 | | - PROP_INCLUDE_POST_CONDITION, DEFAULT_INCLUDEPOSTCONDITION)); |
149 | | - } |
150 | | - |
151 | 130 | public boolean removeDuplicates() { |
152 | 131 | return removeDuplicates; |
153 | 132 | } |
@@ -234,24 +213,6 @@ public boolean useJunit() { |
234 | 213 | return useJunit; |
235 | 214 | } |
236 | 215 |
|
237 | | - |
238 | | - @Override |
239 | | - public void writeSettings(Properties props) { |
240 | | - var prefix = "[" + CATEGORY + "]"; |
241 | | - SettingsConverter.store(props, prefix + PROP_APPLY_SYMBOLIC_EXECUTION, |
242 | | - applySymbolicExecution); |
243 | | - SettingsConverter.store(props, prefix + PROP_CONCURRENT_PROCESSES, concurrentProcesses); |
244 | | - SettingsConverter.store(props, prefix + PROP_INVARIANT_FOR_ALL, invariantForAll); |
245 | | - SettingsConverter.store(props, prefix + PROP_MAX_UWINDS, maxUnwinds); |
246 | | - SettingsConverter.store(props, prefix + PROP_OUTPUT_PATH, outputPath); |
247 | | - SettingsConverter.store(props, prefix + PROP_REMOVE_DUPLICATES, removeDuplicates); |
248 | | - SettingsConverter.store(props, prefix + PROP_USE_RFL, useRFL); |
249 | | - SettingsConverter.store(props, prefix + PROP_USE_JUNIT, useJunit); |
250 | | - SettingsConverter.store(props, prefix + PROP_OPENJML_PATH, openjmlPath); |
251 | | - SettingsConverter.store(props, prefix + PROP_OBJENESIS_PATH, objenesisPath); |
252 | | - SettingsConverter.store(props, prefix + PROP_INCLUDE_POST_CONDITION, includePostCondition); |
253 | | - } |
254 | | - |
255 | 216 | @Override |
256 | 217 | public void readSettings(Configuration props) { |
257 | 218 | var cat = props.getSection(CATEGORY); |
@@ -290,7 +251,7 @@ public void writeSettings(Configuration props) { |
290 | 251 | } |
291 | 252 |
|
292 | 253 | public void set(TestGenerationSettings settings) { |
293 | | - Properties p = new Properties(); |
| 254 | + Configuration p = new Configuration(); |
294 | 255 | settings.writeSettings(p); |
295 | 256 | readSettings(p); |
296 | 257 | } |
|
0 commit comments