KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > search > TypeNameRequestorWrapper


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.internal.core.search;
12
13 import org.eclipse.jdt.core.search.TypeNameRequestor;
14 import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
15
16 /**
17  * Wrapper used to link {@link IRestrictedAccessTypeRequestor} with {@link TypeNameRequestor}.
18  * This wrapper specifically allows usage of internal method {@link BasicSearchEngine#searchAllTypeNames(
19  * char[] packageName,
20  * int packageMatchRule,
21  * char[] typeName,
22  * int typeMatchRule,
23  * int searchFor,
24  * org.eclipse.jdt.core.search.IJavaSearchScope scope,
25  * IRestrictedAccessTypeRequestor nameRequestor,
26  * int waitingPolicy,
27  * org.eclipse.core.runtime.IProgressMonitor monitor) }.
28  * from API method {@link org.eclipse.jdt.core.search.SearchEngine#searchAllTypeNames(
29  * char[] packageName,
30  * int packageMatchRule,
31  * char[] typeName,
32  * int matchRule,
33  * int searchFor,
34  * org.eclipse.jdt.core.search.IJavaSearchScope scope,
35  * TypeNameRequestor nameRequestor,
36  * int waitingPolicy,
37  * org.eclipse.core.runtime.IProgressMonitor monitor) }.
38  */

39 public class TypeNameRequestorWrapper implements IRestrictedAccessTypeRequestor {
40     TypeNameRequestor requestor;
41     public TypeNameRequestorWrapper(TypeNameRequestor requestor) {
42         this.requestor = requestor;
43     }
44     public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String JavaDoc path, AccessRestriction access) {
45         this.requestor.acceptType(modifiers, packageName, simpleTypeName, enclosingTypeNames, path);
46     }
47 }
48
Popular Tags