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.internal.core.search.matching;
11:
12: import org.eclipse.jdt.internal.core.index.*;
13:
14: public class PackageDeclarationPattern extends JavaSearchPattern {
15:
16: protected char[] pkgName;
17:
18: public PackageDeclarationPattern(char[] pkgName, int matchRule) {
19: super (PKG_DECL_PATTERN, matchRule);
20: this .pkgName = pkgName;
21: }
22:
23: EntryResult[] queryIn(Index index) {
24: // package declarations are not indexed
25: return null;
26: }
27:
28: protected StringBuffer print(StringBuffer output) {
29: output.append("PackageDeclarationPattern: <"); //$NON-NLS-1$
30: if (this .pkgName != null)
31: output.append(this .pkgName);
32: else
33: output.append("*"); //$NON-NLS-1$
34: output.append(">"); //$NON-NLS-1$
35: return super.print(output);
36: }
37: }
|