KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > search > TypeNameMatchRequestor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.core.search;
12
13 /**
14  * A <code>TypeNameMatchRequestor</code> collects matches from a <code>searchAllTypeNames</code>
15  * query to a <code>SearchEngine</code>. Clients must subclass this abstract class and pass an instance to the
16  * {@link SearchEngine#searchAllTypeNames(
17  * char[] packageName,
18  * int packageMatchRule,
19  * char[] typeName,
20  * int typeMatchRule,
21  * int searchFor,
22  * IJavaSearchScope scope,
23  * TypeNameMatchRequestor nameMatchRequestor,
24  * int waitingPolicy,
25  * org.eclipse.core.runtime.IProgressMonitor monitor)} method.
26  * Only top-level and member types are reported. Local types are not reported.
27  * <p>
28  * While {@link TypeNameRequestor} only reports type names information (e.g. package, enclosing types, simple name, modifiers, etc.),
29  * this class reports {@link TypeNameMatch} objects instead, which store this information and can return
30  * an {@link org.eclipse.jdt.core.IType} handle.
31  * </p>
32  * <p>
33  * This class may be subclassed by clients.
34  * </p>
35  * @see TypeNameMatch
36  * @see TypeNameRequestor
37  *
38  * @since 3.3
39  */

40 public abstract class TypeNameMatchRequestor {
41     /**
42      * Accepts a type name match ({@link TypeNameMatch}) which contains top-level or a member type
43      * information as package name, enclosing types names, simple type name, modifiers, etc.
44      *
45      * @param match the match which contains all type information
46      */

47     public abstract void acceptTypeNameMatch(TypeNameMatch match);
48 }
49
Popular Tags