use of com.android.tools.idea.experimental.codeanalysis.datastructs.graph.node.ConditionCheckNode in project android by JetBrains.
the class LoopBranchingNodeImpl method processBreaks.
public void processBreaks() {
if (mLoopType == LoopBranchingNode.FOREACH_LOOP) {
//In foreach loop. Break connects to the exit node of the body
GraphNode bodyExit = mLoopBody.getExitNode();
for (GraphNode breakNode : this.breakNodeList) {
GraphNodeUtil.connectGraphNode(breakNode, bodyExit);
}
this.breakNodeList.clear();
} else {
//Null check
if (mConditionCheckExitNode == null) {
return;
}
GraphNode falseBranch = ((ConditionCheckNode) mConditionCheckExitNode).getFalseBranch();
for (GraphNode breakNode : this.breakNodeList) {
GraphNodeUtil.connectGraphNode(breakNode, falseBranch);
}
this.breakNodeList.clear();
}
}
Aggregations