1 package no.uio.ifi.refaktor.analyze.analyzers;
3 import java.util.LinkedList;
6 import no.uio.ifi.refaktor.analyze.collectors.ReturnStatementsChecker;
7 import no.uio.ifi.refaktor.analyze.exceptions.CheckerException;
8 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
10 public class LegalStatementsChecker {
12 private final List<Checker> checkers;
14 public LegalStatementsChecker(CompilationUnitTextSelection selection) {
15 checkers = new LinkedList<Checker>();
16 checkers.add(new EnclosingInstanceReferenceChecker(selection));
17 // TODO: check out org.eclipse.jdt.internal.corext.refactoring.structure.MoveInstanceMethodProcessor.RecursiveCallFinder
18 checkers.add(new ReturnStatementsChecker(selection));
19 checkers.add(new AmbiguousReturnValueChecker(selection));
20 checkers.add(new IllegalStatementsChecker(selection));
23 public boolean allStatementsAreLegal() {
25 for(Checker checker: checkers)
27 } catch (CheckerException e) {