1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.core.search;
14 * A <code>ITypeNameRequestor</code> collects search results from a <code>searchAllTypeNames</code>
15 * query to a <code>SearchEngine</code>. Clients must implement this interface and pass
16 * an instance to the <code>searchAllTypeNames(...)</code> method. Only top-level and
17 * member types are reported. Local types are not reported.
19 * This interface may be implemented by clients.
22 public interface ITypeNameRequestor {
24 * Accepts a top-level or a member class.
26 * @param packageName the dot-separated name of the package of the class
27 * @param simpleTypeName the simple name of the class
28 * @param enclosingTypeNames if the class is a member type,
29 * the simple names of the enclosing types from the outer-most to the
30 * direct parent of the class (for example, if the class is x.y.A$B$C then
31 * the enclosing types are [A, B]. This is an empty array if the class
32 * is a top-level type.
33 * @param path the full path to the resource containing the class. If the resource is a .class file
34 * or a .java file, this is the full path in the workspace to this resource. If the
35 * resource is an archive (that is, a .zip or .jar file), the path is composed of 2 paths separated
36 * by <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>:
37 * the first path is the full OS path to the archive (if it is an external archive),
38 * or the workspace relative <code>IPath</code> to the archive (if it is an internal archive),
39 * the second path is the path to the resource inside the archive.
41 void acceptClass(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path);
43 * Accepts a top-level or a member interface.
45 * @param packageName the dot-separated name of the package of the interface
46 * @param simpleTypeName the simple name of the interface
47 * @param enclosingTypeNames if the interface is a member type,
48 * the simple names of the enclosing types from the outer-most to the
49 * direct parent of the interface (for example, if the interface is x.y.A$B$I then
50 * the enclosing types are [A, B]. This is an empty array if the interface
51 * is a top-level type.
52 * @param path the full path to the resource containing the interface. If the resource is a .class file
53 * or a .java file, this is the full path in the workspace to this resource. If the
54 * resource is an archive (that is, a .zip or .jar file), the path is composed of 2 paths separated
55 * by <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>:
56 * the first path is the full OS path to the archive (if it is an external archive),
57 * or the workspace relative <code>IPath</code> to the archive (if it is an internal archive),
58 * the second path is the path to the resource inside the archive.
60 void acceptInterface(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path);