Search in sources :

Example 1 with CaseIntermediateComparator

use of org.candle.decompiler.intermediate.code.CaseIntermediateComparator in project candle-decompiler by bradsdavis.

the class IntermediateGraphContext method getCases.

public List<CaseIntermediate> getCases(SwitchIntermediate si) {
    List<AbstractIntermediate> intermediate = Graphs.successorListOf(graph, si);
    List<CaseIntermediate> switchCases = new LinkedList<CaseIntermediate>();
    for (AbstractIntermediate i : intermediate) {
        if (i instanceof CaseIntermediate) {
            switchCases.add((CaseIntermediate) i);
        }
    }
    Collections.sort(switchCases, new CaseIntermediateComparator());
    return switchCases;
}
Also used : AbstractIntermediate(org.candle.decompiler.intermediate.code.AbstractIntermediate) CaseIntermediateComparator(org.candle.decompiler.intermediate.code.CaseIntermediateComparator) CaseIntermediate(org.candle.decompiler.intermediate.code.CaseIntermediate) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 AbstractIntermediate (org.candle.decompiler.intermediate.code.AbstractIntermediate)1 CaseIntermediate (org.candle.decompiler.intermediate.code.CaseIntermediate)1 CaseIntermediateComparator (org.candle.decompiler.intermediate.code.CaseIntermediateComparator)1