MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / process

Method process

src/main/java/wycc/util/OptArg.java:261–282  ·  view source on GitHub ↗
(String arg, String option, Map<String,Object> options)

Source from the content-addressed store, hash-verified

259
260 private static final class OPTIONSMAP implements Kind {
261 @Override
262 public void process(String arg, String option, Map<String,Object> options) {
263 String[] name = option.split(":");
264 Map<String, Object> config = Collections.EMPTY_MAP;
265 if (name.length > 1) {
266 config = splitConfig(name[1]);
267 }
268 Map<String,Map<String,Object>> values = (Map<String,Map<String,Object>>) options.get(arg);
269
270 if(values == null) {
271 values = new HashMap<>();
272 options.put(arg, values);
273 }
274
275 Map<String,Object> attributes = values.get(name[0]);
276
277 if(attributes == null) {
278 values.put(name[0], config);
279 } else {
280 attributes.putAll(config);
281 }
282 }
283 @Override
284 public String toString() {
285 return "name:[attribute=value]+";

Callers

nothing calls this directly

Calls 2

splitConfigMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected