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>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. 18 * <p> 19 * This interface may be implemented by clients. 20 * </p> 21 * @deprecated Use abstract class {@link TypeNameRequestor} instead. 22 */ 23 public interface ITypeNameRequestor { 24 /** 25 * Accepts a top-level or a member class. 26 * 27 * @param packageName the dot-separated name of the package of the class 28 * @param simpleTypeName the simple name of the class 29 * @param enclosingTypeNames if the class is a member type, 30 * the simple names of the enclosing types from the outer-most to the 31 * direct parent of the class (for example, if the class is x.y.A$B$C then 32 * the enclosing types are [A, B]. This is an empty array if the class 33 * is a top-level type. 34 * @param path the full path to the resource containing the class. If the resource is a .class file 35 * or a source file, this is the full path in the workspace to this resource. If the 36 * resource is an archive (that is, a .zip or .jar file), the path is composed of 2 paths separated 37 * by <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>: 38 * the first path is the full OS path to the archive (if it is an external archive), 39 * or the workspace relative <code>IPath</code> to the archive (if it is an internal archive), 40 * the second path is the path to the resource inside the archive. 41 */ 42 void acceptClass(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path); 43 /** 44 * Accepts a top-level or a member interface. 45 * 46 * @param packageName the dot-separated name of the package of the interface 47 * @param simpleTypeName the simple name of the interface 48 * @param enclosingTypeNames if the interface is a member type, 49 * the simple names of the enclosing types from the outer-most to the 50 * direct parent of the interface (for example, if the interface is x.y.A$B$I then 51 * the enclosing types are [A, B]. This is an empty array if the interface 52 * is a top-level type. 53 * @param path the full path to the resource containing the interface. If the resource is a .class file 54 * or a source file, this is the full path in the workspace to this resource. If the 55 * resource is an archive (that is, a .zip or .jar file), the path is composed of 2 paths separated 56 * by <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>: 57 * the first path is the full OS path to the archive (if it is an external archive), 58 * or the workspace relative <code>IPath</code> to the archive (if it is an internal archive), 59 * the second path is the path to the resource inside the archive. 60 * */ 61 void acceptInterface(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path); 62 } 63