MCPcopy Index your code
hub / github.com/SummerSec/SPATool / parse

Method parse

src/main/java/com/sumsec/core/ast/Parser.java:25–38  ·  view source on GitHub ↗
(String content,String filetype,boolean img)

Source from the content-addressed store, hash-verified

23 private static Logger log = LogManager.getLogger(Parser.class);
24 private static HashMap<String,ASTType> hashMap = new HashMap<>();
25 public void parse(String content,String filetype,boolean img) {
26 log.info("开始解析文件");
27 log.info("准备环境");
28 hashMap.put("DOT",new ASTDot());
29 hashMap.put("JSON",new ASTJSON());
30 hashMap.put("XML",new ASTXML());
31 hashMap.put("YAML",new ASTYaml());
32 hashMap.get(filetype).handle(content, ConstatField.ASTHomeTemp + File.separator + System.nanoTime() + "." + filetype.toLowerCase());
33 if (filetype.contains("DOT") && img) {
34 log.info("dot转化图片");
35 DotHandler dotHandler = new DotHandler();
36 dotHandler.ImageHandler();
37 }
38 }
39
40}

Callers 7

ASTGMethod · 0.95
ASTSaveMethod · 0.95
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
initCliArgsMethod · 0.80

Calls 2

ImageHandlerMethod · 0.95
handleMethod · 0.45

Tested by

no test coverage detected