MCPcopy Create free account
hub / github.com/LFYSec/MScan / readConfigs

Method readConfigs

src/main/java/pascal/taie/config/PlanConfig.java:95–104  ·  view source on GitHub ↗

Read a list of PlanConfig from given file.

(File file)

Source from the content-addressed store, hash-verified

93 * Read a list of PlanConfig from given file.
94 */
95 public static List<PlanConfig> readConfigs(File file) {
96 ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
97 JavaType type = mapper.getTypeFactory()
98 .constructCollectionType(List.class, PlanConfig.class);
99 try {
100 return mapper.readValue(file, type);
101 } catch (IOException e) {
102 throw new ConfigException("Failed to read plan file " + file, e);
103 }
104 }
105
106 /**
107 * Reads a list of PlanConfig from options.

Callers 2

testAnalysesMethod · 0.95
processConfigsMethod · 0.95

Calls 8

streamMethod · 0.80
getAnalysesMethod · 0.80
mapMethod · 0.65
entrySetMethod · 0.65
isEmptyMethod · 0.65
ofMethod · 0.65
getKeyMethod · 0.45
getValueMethod · 0.45

Tested by 1

testAnalysesMethod · 0.76