diff --git a/src/org/ntlab/pushPullRefactoring/FieldFindVisitor.java b/src/org/ntlab/pushPullRefactoring/FieldFindVisitor.java new file mode 100644 index 0000000..076ab51 --- /dev/null +++ b/src/org/ntlab/pushPullRefactoring/FieldFindVisitor.java @@ -0,0 +1,17 @@ +package org.ntlab.pushPullRefactoring; + +import org.eclipse.jdt.core.dom.*; + +public class FieldFindVisitor extends ASTVisitor{ + private String fieldName; + + private FieldDeclaration field; + @Override + public boolean visit(FieldDeclaration node) { + String name = node.getClass().getCanonicalName(); + if (name.equals(this.fieldName)) { + this.field = node; + } + return false; + } +}