01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.core.search;
11:
12: /**
13: * A <code>TypeNameRequestor</code> collects search results from a <code>searchAllTypeNames</code>
14: * query to a <code>SearchEngine</code>. Clients must subclass this abstract class and pass
15: * an instance to the <code>SearchEngine.searchAllTypeNames(...)</code> method. Only top-level and
16: * member types are reported. Local types are not reported.
17: * <p>
18: * This class may be subclassed by clients.
19: * </p>
20: * @since 3.1
21: */
22: public abstract class TypeNameRequestor {
23: /**
24: * Accepts a top-level or a member type.
25: * <p>
26: * The default implementation of this method does nothing.
27: * Subclasses should override.
28: * </p>
29: *
30: * @param modifiers the modifier flags of the type. Note that for source type,
31: * these flags may slightly differ from thoses get after resolution.
32: * For example an interface defined by <code>interface A {}</code>,
33: * although obviously public, will be returned false by <code>Flags.isPublic(modifiers)</code>
34: * due to the fact that its declaration does not explicitely define public flag.
35: * @see org.eclipse.jdt.core.Flags
36: * @param packageName the name of the package declaration of the type (ie. a dot-separated name)
37: * @param simpleTypeName the simple name of the type
38: * @param enclosingTypeNames if the type is a member type,
39: * the simple names of the enclosing types from the outer-most to the
40: * direct parent of the type (for example, if the class is x.y.A$B$C then
41: * the enclosing types are [A, B]. This is an empty array if the type
42: * is a top-level type.
43: * @param path the full path to the resource containing the type. If the resource is a .class file
44: * or a source file, this is the full path in the workspace to this resource. If the
45: * resource is an archive (that is, a .zip or .jar file), the path is composed of 2 paths separated
46: * by <code>IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR</code>:
47: * the first path is the full OS path to the archive (if it is an external archive),
48: * or the workspace relative <code>IPath</code> to the archive (if it is an internal archive),
49: * the second path is the path to the resource inside the archive.
50: */
51: public void acceptType(int modifiers, char[] packageName,
52: char[] simpleTypeName, char[][] enclosingTypeNames,
53: String path) {
54: // do nothing
55: }
56: }
|