]> git.uio.no Git - ifi-stolz-refaktor.git/blobdiff - software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/collectors/BranchingStatementsChecker.java
LegalStatementsChecker: refactoring
[ifi-stolz-refaktor.git] / software / no.uio.ifi.refaktor / src / no / uio / ifi / refaktor / analyze / collectors / BranchingStatementsChecker.java
index 30dbb1be9837580b754e22e32057ba34741d039a..f0d29314dcf97aeb2cc4b44978b5717063015ce4 100644 (file)
@@ -1,18 +1,21 @@
 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();
        }
 
 }