package no.uio.ifi.refaktor.analyze.collectors;
+import no.uio.ifi.refaktor.analyze.analyzers.Checker;
+import no.uio.ifi.refaktor.analyze.analyzers.IllegalExpressionFoundException;
+import no.uio.ifi.refaktor.analyze.analyzers.IllegalStatementFoundException;
import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
-public class BranchingStatementsChecker {
+public class BranchingStatementsChecker implements Checker {
- private final ReturnStatementsChecker returnStatementsChecker;
+ private final Checker checker;
public BranchingStatementsChecker(CompilationUnitTextSelection selection) {
- returnStatementsChecker = new ReturnStatementsChecker(selection);
+ checker = new ReturnStatementsChecker(selection);
}
- public boolean allStatementsOK() {
- // TODO: Handle break/continue
- return returnStatementsChecker.isOK();
+ @Override
+ public void check() throws IllegalStatementFoundException, IllegalExpressionFoundException {
+ checker.check();
}
}