Search in sources :

Example 1 with IntermediateLabelProvider

use of org.candle.decompiler.intermediate.graph.IntermediateLabelProvider in project candle-decompiler by bradsdavis.

the class IntermediateGraphWriter method process.

@Override
public void process() {
    if (directory == null) {
        return;
    }
    File a = new File(directory.getAbsolutePath() + File.separator + name);
    LOG.debug("Instruction Graph: " + a.getAbsolutePath());
    Writer x;
    try {
        x = new FileWriter(a);
        DOTExporter<AbstractIntermediate, IntermediateEdge> dot = new DOTExporter<AbstractIntermediate, IntermediateEdge>(new IntegerNameProvider<AbstractIntermediate>(), new IntermediateLabelProvider(), new IntermediateEdgeProvider(), new IntermediateVertexAttributeProvider(), new InstructionEdgeAttributeProvider());
        dot.export(x, igc.getGraph());
    } catch (IOException e) {
        e.printStackTrace();
    }
    LOG.debug("End Instruction Graph ======");
}
Also used : AbstractIntermediate(org.candle.decompiler.intermediate.code.AbstractIntermediate) DOTExporter(org.jgrapht.ext.DOTExporter) IntermediateEdgeProvider(org.candle.decompiler.intermediate.graph.edge.IntermediateEdgeProvider) FileWriter(java.io.FileWriter) IOException(java.io.IOException) IntermediateEdge(org.candle.decompiler.intermediate.graph.edge.IntermediateEdge) IntermediateVertexAttributeProvider(org.candle.decompiler.intermediate.graph.IntermediateVertexAttributeProvider) IntermediateLabelProvider(org.candle.decompiler.intermediate.graph.IntermediateLabelProvider) InstructionEdgeAttributeProvider(org.candle.decompiler.instruction.graph.edge.InstructionEdgeAttributeProvider) File(java.io.File) FileWriter(java.io.FileWriter) Writer(java.io.Writer)

Aggregations

File (java.io.File)1 FileWriter (java.io.FileWriter)1 IOException (java.io.IOException)1 Writer (java.io.Writer)1 InstructionEdgeAttributeProvider (org.candle.decompiler.instruction.graph.edge.InstructionEdgeAttributeProvider)1 AbstractIntermediate (org.candle.decompiler.intermediate.code.AbstractIntermediate)1 IntermediateLabelProvider (org.candle.decompiler.intermediate.graph.IntermediateLabelProvider)1 IntermediateVertexAttributeProvider (org.candle.decompiler.intermediate.graph.IntermediateVertexAttributeProvider)1 IntermediateEdge (org.candle.decompiler.intermediate.graph.edge.IntermediateEdge)1 IntermediateEdgeProvider (org.candle.decompiler.intermediate.graph.edge.IntermediateEdgeProvider)1 DOTExporter (org.jgrapht.ext.DOTExporter)1