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

Method dump

src/main/java/pascal/taie/analysis/misc/IRDumper.java:96–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 }
95
96 private void dump() {
97 String fileName = jclass.getName() + SUFFIX;
98 try (PrintStream out = new PrintStream(new FileOutputStream(
99 new File(dumpDir, fileName)))) {
100 this.out = out;
101 dumpClassDeclaration();
102 out.println(" {");
103 out.println();
104 if (!jclass.getDeclaredFields().isEmpty()) {
105 jclass.getDeclaredFields().forEach(this::dumpField);
106 }
107 jclass.getDeclaredMethods().forEach(this::dumpMethod);
108 out.println("}");
109 } catch (FileNotFoundException e) {
110 logger.warn("Failed to dump class {}", jclass, e);
111 }
112 }
113
114 private void dumpClassDeclaration() {
115 // dump annotations

Callers 1

analyzeMethod · 0.45

Calls 6

dumpClassDeclarationMethod · 0.95
getNameMethod · 0.65
isEmptyMethod · 0.65
getDeclaredFieldsMethod · 0.65
forEachMethod · 0.65
getDeclaredMethodsMethod · 0.65

Tested by

no test coverage detected