1 11 package org.eclipse.jdt.internal.corext.util; 12 13 import java.util.Collection ; 14 15 import org.eclipse.core.runtime.Assert; 16 17 import org.eclipse.jdt.core.search.TypeNameMatch; 18 import org.eclipse.jdt.core.search.TypeNameMatchRequestor; 19 20 public class TypeNameMatchCollector extends TypeNameMatchRequestor { 21 22 private final Collection fCollection; 23 24 public TypeNameMatchCollector(Collection collection) { 25 Assert.isNotNull(collection); 26 fCollection= collection; 27 } 28 29 private boolean inScope(TypeNameMatch match) { 30 return !TypeFilter.isFiltered(match); 31 } 32 33 36 public void acceptTypeNameMatch(TypeNameMatch match) { 37 if (inScope(match)) { 38 fCollection.add(match); 39 } 40 } 41 42 } 43 | Popular Tags |