A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / search / ITypeNameRequestor.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.core.search;
12
13 /**
14  * A <code>ITypeNameRequestor</code> collects search results from a
15  * <code>searchAllTypeNames</code> query to a <code>SearchEngine</code>.
16  * Clients must implement this interface and pass an instance to the
17  * <code>searchAllTypeNames(...)</code> method. Only top-level and member
18  * types are reported. Local types are not reported.
19  * <p>
20  * This interface may be implemented by clients.
21  * </p>
22  */
23 public interface ITypeNameRequestor {
24         /**
25          * Accepts a top-level or a member class.
26          * 
27          * @param packageName
28          *            the dot-separated name of the package of the class
29          * @param simpleTypeName
30          *            the simple name of the class
31          * @param enclosingTypeNames
32          *            if the class is a member type, the simple names of the
33          *            enclosing types from the outer-most to the direct parent of
34          *            the class (for example, if the class is x.y.A$B$C then the
35          *            enclosing types are [A, B]. This is an empty array if the
36          *            class is a top-level type.
37          * @param path
38          *            the full path to the resource containing the class. If the
39          *            resource is a .class file or a .java file, this is the full
40          *            path in the workspace to this resource. If the resource is an
41          *            archive (that is, a .zip or .jar file), the path is composed
42          *            of 2 paths separated by
43          *            <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>: the
44          *            first path is the full OS path to the archive (if it is an
45          *            external archive), or the workspace relative
46          *            <code>IPath</code> to the archive (if it is an internal
47          *            archive), the second path is the path to the resource inside
48          *            the archive.
49          */
50         void acceptClass(char[] packageName, char[] simpleTypeName,
51                         char[][] enclosingTypeNames, String path);
52
53         /**
54          * Accepts a top-level or a member interface.
55          * 
56          * @param packageName
57          *            the dot-separated name of the package of the interface
58          * @param simpleTypeName
59          *            the simple name of the interface
60          * @param enclosingTypeNames
61          *            if the interface is a member type, the simple names of the
62          *            enclosing types from the outer-most to the direct parent of
63          *            the interface (for example, if the interface is x.y.A$B$I then
64          *            the enclosing types are [A, B]. This is an empty array if the
65          *            interface is a top-level type.
66          * @param path
67          *            the full path to the resource containing the interface. If the
68          *            resource is a .class file or a .java file, this is the full
69          *            path in the workspace to this resource. If the resource is an
70          *            archive (that is, a .zip or .jar file), the path is composed
71          *            of 2 paths separated by
72          *            <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>: the
73          *            first path is the full OS path to the archive (if it is an
74          *            external archive), or the workspace relative
75          *            <code>IPath</code> to the archive (if it is an internal
76          *            archive), the second path is the path to the resource inside
77          *            the archive.
78          */
79         void acceptInterface(char[] packageName, char[] simpleTypeName,
80                         char[][] enclosingTypeNames, String path);
81 }