Package org.candle.decompiler.intermediate.graph.edge

Examples of org.candle.decompiler.intermediate.graph.edge.ConditionEdge


      orderedSuccessors.addAll(successors);
     
      if(successors.size() == 2) {
        //lowest will be true condition....
        IntermediateEdge truePath = igc.getGraph().getEdge(ih, orderedSuccessors.first());
        ConditionEdge trueCondition = createConditionalEdge(truePath, true);
        igc.getGraph().removeEdge(truePath);
        igc.getGraph().addEdge(ih, orderedSuccessors.first(), trueCondition);
       
        //highest will be false condition....
        IntermediateEdge falsePath = igc.getGraph().getEdge(ih, orderedSuccessors.last());
        ConditionEdge falseCondition = createConditionalEdge(falsePath, false);
        igc.getGraph().removeEdge(falsePath);
        igc.getGraph().addEdge(ih, orderedSuccessors.last(), falseCondition);
      }
    }
  }
View Full Code Here


      }
    }
  }

  public ConditionEdge createConditionalEdge(IntermediateEdge ie, boolean condition) {
    ConditionEdge ce = new ConditionEdge();
    ce.setCondition(condition);
    ce.setType(ie.getType());
    ce.getAttributes().putAll(ie.getAttributes());
   
    return ce;
  }
View Full Code Here

TOP

Related Classes of org.candle.decompiler.intermediate.graph.edge.ConditionEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.