-
-
Save igor-suhorukov/ddd5c9cac11615d93d0c6c19f65b42b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws Exception{ | |
CliClient cliClient = new CliClient(); | |
Map<String, MethodCall> connect = cliClient.connect(UUID.randomUUID().toString(), "127.0.0.1", 60001, "org.springframework.boot.*"); | |
Set<Map.Entry<String, MethodCall>> entries = connect.entrySet(); | |
for(Map.Entry<String, MethodCall> entry : entries){ | |
if(entry.getKey().endsWith("<init>") || | |
entry.getKey().endsWith("<clinit>")) continue; | |
String diagram = SdEditDataRenderer.getSequenceDiagram(entry.getValue()); | |
if(diagram.split("\n").length>100){ | |
System.out.println("diagram too large "+entry.getKey()); | |
continue; | |
} | |
byte[] image = createImage(diagram); | |
FileOutputStream outputStream = new FileOutputStream(entry.getKey().replace("#","_")+".png"); | |
IOUtils.copyAndClose(new ByteArrayInputStream(image), outputStream); | |
} | |
System.out.println(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment