public void seekTypes(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags, IJavaElementRequestor requestor) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor, true); }
public void seekTypes(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags, IJavaElementRequestor requestor) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor, true); }
public void seekTypes(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags, IJavaElementRequestor requestor) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor, true); }
public void seekTypes(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags, IJavaElementRequestor requestor) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor, true); }
public void seekTypes(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags, IJavaElementRequestor requestor) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor, true); }
/** * Returns all types whose simple name matches with the given <code>name</code>. */ private void findExactTypes(String name, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); this.nameLookup.seekTypes(name, null, false, type, requestor); }
/** * Returns all types whose simple name matches with the given <code>name</code>. */ private void findExactTypes(String name, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); this.nameLookup.seekTypes(name, null, false, type, requestor); }
/** * Returns all types whose simple name matches with the given <code>name</code>. */ private void findExactTypes(String name, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); this.nameLookup.seekTypes(name, null, false, type, requestor); }
/** * Returns all types whose simple name matches with the given <code>name</code>. */ private void findExactTypes(String name, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); this.nameLookup.seekTypes(name, null, false, type, requestor); }
/** * Returns all types whose simple name matches with the given <code>name</code>. */ private void findExactTypes(String name, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); this.nameLookup.seekTypes(name, null, false, type, requestor); }
/** * Returns all types whose simple name matches with the given <code>name</code>. */ private void findExactTypes(String name, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); this.nameLookup.seekTypes(name, null, false, type, requestor); }
/** * Notifies the given requestor of all package fragments with the * given name. Checks the requestor at regular intervals to see if the * requestor has canceled. The domain of * the search is bounded by the <code>IJavaProject</code> * this <code>NameLookup</code> was obtained from. * * @param partialMatch partial name matches qualify when <code>true</code>; * only exact name matches qualify when <code>false</code> */ public void seekTypes(String pkgName, String name, boolean partialMatch, IJavaElementRequestor requestor, int acceptFlags, IPackageFragmentRoot[] moduleContext, String moduleName) { Selector selector = new Selector(moduleName); seekPackageFragments(pkgName, true /*partialMatch*/, selector, moduleContext); if (selector.pkgFragments.size() == 0) return; for (IPackageFragment pkg : selector.pkgFragments) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor); } }
/** * Notifies the given requestor of all package fragments with the * given name. Checks the requestor at regular intervals to see if the * requestor has canceled. The domain of * the search is bounded by the <code>IJavaProject</code> * this <code>NameLookup</code> was obtained from. * * @param partialMatch partial name matches qualify when <code>true</code>; * only exact name matches qualify when <code>false</code> */ public void seekTypes(String pkgName, String name, boolean partialMatch, IJavaElementRequestor requestor, int acceptFlags, IPackageFragmentRoot[] moduleContext, String moduleName) { Selector selector = new Selector(moduleName); seekPackageFragments(pkgName, true /*partialMatch*/, selector, moduleContext); if (selector.pkgFragments.size() == 0) return; for (IPackageFragment pkg : selector.pkgFragments) { seekTypes(name, pkg, partialMatch, acceptFlags, requestor); } }
/** * Returns all types whose name starts with the given (qualified) <code>prefix</code>. * * If the <code>prefix</code> is unqualified, all types whose simple name matches * the <code>prefix</code> are returned. */ private void findTypes(String prefix, ISearchRequestor storage, int type) { //TODO (david) should add camel case support SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); int index = prefix.lastIndexOf('.'); if (index == -1) { this.nameLookup.seekTypes(prefix, null, true, type, requestor); } else { String packageName = prefix.substring(0, index); JavaElementRequestor elementRequestor = new JavaElementRequestor(); this.nameLookup.seekPackageFragments(packageName, false, elementRequestor); IPackageFragment[] fragments = elementRequestor.getPackageFragments(); if (fragments != null) { String className = prefix.substring(index + 1); for (int i = 0, length = fragments.length; i < length; i++) if (fragments[i] != null) this.nameLookup.seekTypes(className, fragments[i], true, type, requestor); } } }
/** * Returns all types whose name starts with the given (qualified) <code>prefix</code>. * * If the <code>prefix</code> is unqualified, all types whose simple name matches * the <code>prefix</code> are returned. */ private void findTypes(String prefix, ISearchRequestor storage, int type) { //TODO (david) should add camel case support SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); int index = prefix.lastIndexOf('.'); if (index == -1) { this.nameLookup.seekTypes(prefix, null, true, type, requestor); } else { String packageName = prefix.substring(0, index); JavaElementRequestor elementRequestor = new JavaElementRequestor(); this.nameLookup.seekPackageFragments(packageName, false, elementRequestor); IPackageFragment[] fragments = elementRequestor.getPackageFragments(); if (fragments != null) { String className = prefix.substring(index + 1); for (int i = 0, length = fragments.length; i < length; i++) if (fragments[i] != null) this.nameLookup.seekTypes(className, fragments[i], true, type, requestor); } } }
/** * Returns all types whose name starts with the given (qualified) <code>prefix</code>. * * If the <code>prefix</code> is unqualified, all types whose simple name matches * the <code>prefix</code> are returned. */ private void findTypes(String prefix, ISearchRequestor storage, int type) { //TODO (david) should add camel case support SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); int index = prefix.lastIndexOf('.'); if (index == -1) { this.nameLookup.seekTypes(prefix, null, true, type, requestor); } else { String packageName = prefix.substring(0, index); JavaElementRequestor elementRequestor = new JavaElementRequestor(); this.nameLookup.seekPackageFragments(packageName, false, elementRequestor); IPackageFragment[] fragments = elementRequestor.getPackageFragments(); if (fragments != null) { String className = prefix.substring(index + 1); for (int i = 0, length = fragments.length; i < length; i++) if (fragments[i] != null) this.nameLookup.seekTypes(className, fragments[i], true, type, requestor); } } }
/** * Returns all types whose name starts with the given (qualified) <code>prefix</code>. * * If the <code>prefix</code> is unqualified, all types whose simple name matches * the <code>prefix</code> are returned. */ private void findTypes(String prefix, ISearchRequestor storage, int type) { //TODO (david) should add camel case support SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor(storage, this.unitToSkip, this.project, this.nameLookup); int index = prefix.lastIndexOf('.'); if (index == -1) { this.nameLookup.seekTypes(prefix, null, true, type, requestor); } else { String packageName = prefix.substring(0, index); JavaElementRequestor elementRequestor = new JavaElementRequestor(); this.nameLookup.seekPackageFragments(packageName, false, elementRequestor); IPackageFragment[] fragments = elementRequestor.getPackageFragments(); if (fragments != null) { String className = prefix.substring(index + 1); for (int i = 0, length = fragments.length; i < length; i++) if (fragments[i] != null) this.nameLookup.seekTypes(className, fragments[i], true, type, requestor); } } }
/** * Returns the first type in the given package whose name * matches the given (unqualified) name, or <code>null</code> if none * exist. Specifying a <code>null</code> package will result in no matches. * The domain of the search is bounded by the Java project from which * this name lookup was obtained. * <br> * Note that this method does not find secondary types. * <br> * @param name the name of the type to find * @param pkg the package to search * @param partialMatch partial name matches qualify when <code>true</code>, * only exact name matches qualify when <code>false</code> * @param acceptFlags a bit mask describing if classes, interfaces or both classes and interfaces * are desired results. If no flags are specified, all types are returned. * * @see #ACCEPT_CLASSES * @see #ACCEPT_INTERFACES * @see #ACCEPT_ENUMS * @see #ACCEPT_ANNOTATIONS */ public IType findType(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags) { if (pkg == null) return null; // Return first found (ignore duplicates). SingleTypeRequestor typeRequestor = new SingleTypeRequestor(); seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor, false); return typeRequestor.getType(); }
/** * Returns the first type in the given package whose name * matches the given (unqualified) name, or <code>null</code> if none * exist. Specifying a <code>null</code> package will result in no matches. * The domain of the search is bounded by the Java project from which * this name lookup was obtained. * <br> * Note that this method does not find secondary types. * <br> * @param name the name of the type to find * @param pkg the package to search * @param partialMatch partial name matches qualify when <code>true</code>, * only exact name matches qualify when <code>false</code> * @param acceptFlags a bit mask describing if classes, interfaces or both classes and interfaces * are desired results. If no flags are specified, all types are returned. * * @see #ACCEPT_CLASSES * @see #ACCEPT_INTERFACES * @see #ACCEPT_ENUMS * @see #ACCEPT_ANNOTATIONS */ public IType findType(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags) { if (pkg == null) return null; // Return first found (ignore duplicates). SingleTypeRequestor typeRequestor = new SingleTypeRequestor(); seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor, false); return typeRequestor.getType(); }
/** * Returns the first type in the given package whose name * matches the given (unqualified) name, or <code>null</code> if none * exist. Specifying a <code>null</code> package will result in no matches. * The domain of the search is bounded by the Java project from which * this name lookup was obtained. * <br> * Note that this method does not find secondary types. * <br> * @param name the name of the type to find * @param pkg the package to search * @param partialMatch partial name matches qualify when <code>true</code>, * only exact name matches qualify when <code>false</code> * @param acceptFlags a bit mask describing if classes, interfaces or both classes and interfaces * are desired results. If no flags are specified, all types are returned. * * @see #ACCEPT_CLASSES * @see #ACCEPT_INTERFACES * @see #ACCEPT_ENUMS * @see #ACCEPT_ANNOTATIONS */ public IType findType(String name, IPackageFragment pkg, boolean partialMatch, int acceptFlags) { if (pkg == null) return null; // Return first found (ignore duplicates). SingleTypeRequestor typeRequestor = new SingleTypeRequestor(); seekTypes(name, pkg, partialMatch, acceptFlags, typeRequestor, false); return typeRequestor.getType(); }