private static Statement DetectStatement(Statement head) { Statement res; if ((res = DoStatement.IsHead(head)) != null) { return(res); } if ((res = SwitchStatement.IsHead(head)) != null) { return(res); } if ((res = IfStatement.IsHead(head)) != null) { return(res); } // synchronized statements will be identified later // right now they are recognized as catchall if ((res = SequenceStatement.IsHead2Block(head)) != null) { return(res); } if ((res = CatchStatement.IsHead(head)) != null) { return(res); } if ((res = CatchAllStatement.IsHead(head)) != null) { return(res); } return(null); }