1 11 package org.eclipse.jdt.internal.core; 12 13 import org.eclipse.jdt.core.IField; 14 import org.eclipse.jdt.core.IInitializer; 15 import org.eclipse.jdt.core.IMethod; 16 import org.eclipse.jdt.core.IPackageFragment; 17 import org.eclipse.jdt.core.IType; 18 19 23 class SingleTypeRequestor implements IJavaElementRequestor { 24 27 protected IType fElement= null; 28 31 public void acceptField(IField field) { 32 } 34 37 public void acceptInitializer(IInitializer initializer) { 38 } 40 43 public void acceptMemberType(IType type) { 44 fElement= type; 45 } 46 49 public void acceptMethod(IMethod method) { 50 } 52 55 public void acceptPackageFragment(IPackageFragment packageFragment) { 56 } 58 61 public void acceptType(IType type) { 62 fElement= type; 63 } 64 68 public IType getType() { 69 return fElement; 70 } 71 74 public boolean isCanceled() { 75 return fElement != null; 76 } 77 80 public void reset() { 81 fElement= null; 82 } 83 } 84 | Popular Tags |