KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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>TypeNameRequestor</code> collects search results from a <code>searchAllTypeNames</code>
15  * query to a <code>SearchEngine</code>. Clients must subclass this abstract class and pass
16  * an instance to the <code>SearchEngine.searchAllTypeNames(...)</code> method. Only top-level and
17  * member types are reported. Local types are not reported.
18  * <p>
19  * This class may be subclassed by clients.
20  * </p>
21  * @since 3.1
22  */

23 public abstract class TypeNameRequestor {
24     /**
25      * Accepts a top-level or a member type.
26      * <p>
27      * The default implementation of this method does nothing.
28      * Subclasses should override.
29      * </p>
30      *
31      * @param modifiers the modifier flags of the type. Note that for source type,
32      * these flags may slightly differ from thoses get after resolution.
33      * For example an interface defined by <code>interface A {}</code>,
34      * although obviously public, will be returned false by <code>Flags.isPublic(modifiers)</code>
35      * due to the fact that its declaration does not explicitely define public flag.
36      * @see org.eclipse.jdt.core.Flags
37      * @param packageName the dot-separated name of the package of the type
38      * @param simpleTypeName the simple name of the type
39      * @param enclosingTypeNames if the type is a member type,
40      * the simple names of the enclosing types from the outer-most to the
41      * direct parent of the type (for example, if the class is x.y.A$B$C then
42      * the enclosing types are [A, B]. This is an empty array if the type
43      * is a top-level type.
44      * @param path the full path to the resource containing the type. If the resource is a .class file
45      * or a source file, this is the full path in the workspace to this resource. If the
46      * resource is an archive (that is, a .zip or .jar file), the path is composed of 2 paths separated
47      * by <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>:
48      * the first path is the full OS path to the archive (if it is an external archive),
49      * or the workspace relative <code>IPath</code> to the archive (if it is an internal archive),
50      * the second path is the path to the resource inside the archive.
51      */

52     public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String JavaDoc path) {
53         // do nothing
54
}
55 }
56
Popular Tags