KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > search > IJavaSearchConstants


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.core.search;
12
13 import org.eclipse.jdt.internal.core.search.processing.*;
14
15 /**
16  * <p>
17  * This interface defines the constants used by the search engine.
18  * </p>
19  * <p>
20  * This interface declares constants only; it is not intended to be implemented.
21  * </p>
22  * @see org.eclipse.jdt.core.search.SearchEngine
23  */

24 public interface IJavaSearchConstants {
25
26     /**
27      * The nature of searched element or the nature
28      * of match in unknown.
29      */

30     int UNKNOWN = -1;
31     
32     /* Nature of searched element */
33     
34     /**
35      * The searched element is a type, which may include classes, interfaces,
36      * enums, and annotation types.
37      */

38     int TYPE= 0;
39
40     /**
41      * The searched element is a method.
42      */

43     int METHOD= 1;
44
45     /**
46      * The searched element is a package.
47      */

48     int PACKAGE= 2;
49
50     /**
51      * The searched element is a constructor.
52      */

53     int CONSTRUCTOR= 3;
54
55     /**
56      * The searched element is a field.
57      */

58     int FIELD= 4;
59
60     /**
61      * The searched element is a class.
62      * More selective than using {@link #TYPE}.
63      */

64     int CLASS= 5;
65
66     /**
67      * The searched element is an interface.
68      * More selective than using {@link #TYPE}.
69      */

70     int INTERFACE= 6;
71
72     /**
73      * The searched element is an enum.
74      * More selective than using {@link #TYPE}.
75      * @since 3.1
76      */

77     int ENUM= 7;
78
79     /**
80      * The searched element is an annotation type.
81      * More selective than using {@link #TYPE}.
82      * @since 3.1
83      */

84     int ANNOTATION_TYPE= 8;
85
86     /**
87      * The searched element is a class or enum type.
88      * More selective than using {@link #TYPE}.
89      * @since 3.1
90      */

91     int CLASS_AND_ENUM= 9;
92
93     /**
94      * The searched element is a class or interface type.
95      * More selective than using {@link #TYPE}.
96      * @since 3.1
97      */

98     int CLASS_AND_INTERFACE= 10;
99     
100     /**
101      * The searched element is an interface or annotation type.
102      * More selective than using {@link #TYPE}.
103      * @since 3.3
104      */

105     int INTERFACE_AND_ANNOTATION= 11;
106
107     /* Nature of match */
108
109     /**
110      * The search result is a declaration.
111      * Can be used in conjunction with any of the nature of searched elements
112      * so as to better narrow down the search.
113      */

114     int DECLARATIONS= 0;
115
116     /**
117      * The search result is a type that implements an interface or extends a class.
118      * Used in conjunction with either TYPE or CLASS or INTERFACE, it will
119      * respectively search for any type implementing/extending a type,
120      * or rather exclusively search for classes implementing/extending the type, or
121      * interfaces extending the type.
122      */

123     int IMPLEMENTORS= 1;
124
125     /**
126      * The search result is a reference.
127      * Can be used in conjunction with any of the nature of searched elements
128      * so as to better narrow down the search.
129      * References can contain implementers since they are more generic kind
130      * of matches.
131      */

132     int REFERENCES= 2;
133
134     /**
135      * The search result is a declaration, a reference, or an implementer
136      * of an interface.
137      * Can be used in conjunction with any of the nature of searched elements
138      * so as to better narrow down the search.
139      */

140     int ALL_OCCURRENCES= 3;
141
142     /**
143      * When searching for field matches, it will exclusively find read accesses, as
144      * opposed to write accesses. Note that some expressions are considered both
145      * as field read/write accesses: for example, x++; x+= 1;
146      *
147      * @since 2.0
148      */

149     int READ_ACCESSES = 4;
150     
151     /**
152      * When searching for field matches, it will exclusively find write accesses, as
153      * opposed to read accesses. Note that some expressions are considered both
154      * as field read/write accesses: for example, x++; x+= 1;
155      *
156      * @since 2.0
157      */

158     int WRITE_ACCESSES = 5;
159
160     /**
161      * Ignore declaring type while searching result.
162      * Can be used in conjunction with any of the nature of match.
163      * @since 3.1
164      */

165     int IGNORE_DECLARING_TYPE = 0x10;
166
167     /**
168      * Ignore return type while searching result.
169      * Can be used in conjunction with any of the nature of match.
170      * Note that:
171      * <ul>
172      * <li>for fields search, pattern will ignore field type</li>
173      * <li>this flag will have no effect for types search</li>
174      * </ul>
175      * @since 3.1
176      */

177     int IGNORE_RETURN_TYPE = 0x20;
178     
179     /* Syntactic match modes */
180     
181     /**
182      * The search pattern matches exactly the search result,
183      * that is, the source of the search result equals the search pattern.
184      * @deprecated Use {@link SearchPattern#R_EXACT_MATCH} instead.
185      */

186     int EXACT_MATCH = 0;
187     /**
188      * The search pattern is a prefix of the search result.
189      * @deprecated Use {@link SearchPattern#R_PREFIX_MATCH} instead.
190      */

191     int PREFIX_MATCH = 1;
192     /**
193      * The search pattern contains one or more wild cards ('*') where a
194      * wild-card can replace 0 or more characters in the search result.
195      * @deprecated Use {@link SearchPattern#R_PATTERN_MATCH} instead.
196      */

197     int PATTERN_MATCH = 2;
198
199
200     /* Case sensitivity */
201     
202     /**
203      * The search pattern matches the search result only
204      * if cases are the same.
205      * @deprecated Use the methods that take the matchMode
206      * with {@link SearchPattern#R_CASE_SENSITIVE} as a matchRule instead.
207      */

208     boolean CASE_SENSITIVE = true;
209     /**
210      * The search pattern ignores cases in the search result.
211      * @deprecated Use the methods that take the matchMode
212      * without {@link SearchPattern#R_CASE_SENSITIVE} as a matchRule instead.
213      */

214     boolean CASE_INSENSITIVE = false;
215     
216
217     /* Waiting policies */
218     
219     /**
220      * The search operation starts immediately, even if the underlying indexer
221      * has not finished indexing the workspace. Results will more likely
222      * not contain all the matches.
223      */

224     int FORCE_IMMEDIATE_SEARCH = IJob.ForceImmediate;
225     /**
226      * The search operation throws an <code>org.eclipse.core.runtime.OperationCanceledException</code>
227      * if the underlying indexer has not finished indexing the workspace.
228      */

229     int CANCEL_IF_NOT_READY_TO_SEARCH = IJob.CancelIfNotReady;
230     /**
231      * The search operation waits for the underlying indexer to finish indexing
232      * the workspace before starting the search.
233      */

234     int WAIT_UNTIL_READY_TO_SEARCH = IJob.WaitUntilReady;
235     
236     
237 }
238
Popular Tags