]> git.uio.no Git - ifi-stolz-refaktor.git/blobdiff - case-study/refaktor-before/src/no/uio/ifi/refaktor/analyze/matchers/LoopStatementMatcher.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / refaktor-before / src / no / uio / ifi / refaktor / analyze / matchers / LoopStatementMatcher.java
diff --git a/case-study/refaktor-before/src/no/uio/ifi/refaktor/analyze/matchers/LoopStatementMatcher.java b/case-study/refaktor-before/src/no/uio/ifi/refaktor/analyze/matchers/LoopStatementMatcher.java
new file mode 100644 (file)
index 0000000..136180c
--- /dev/null
@@ -0,0 +1,16 @@
+package no.uio.ifi.refaktor.analyze.matchers;
+
+import org.eclipse.jdt.core.dom.DoStatement;
+import org.eclipse.jdt.core.dom.EnhancedForStatement;
+import org.eclipse.jdt.core.dom.ForStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
+
+public class LoopStatementMatcher implements InstanceOfMatcher {
+
+       @Override
+       public boolean matches(Object o) {
+               return o instanceof WhileStatement || o instanceof DoStatement 
+                               || o instanceof ForStatement || o instanceof EnhancedForStatement;
+       }
+
+}