KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > search > JavaElementMatch


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.internal.ui.search;
12
13 import org.eclipse.search.ui.text.Match;
14
15 /**
16  * A search match with additional java-specific info.
17  */

18 public class JavaElementMatch extends Match {
19     private final int fAccuracy;
20     private final int fMatchRule;
21     private final boolean fIsWriteAccess;
22     private final boolean fIsReadAccess;
23     private final boolean fIsJavadoc;
24     private final boolean fIsSuperInvocation;
25     
26     JavaElementMatch(Object JavaDoc element, int matchRule, int offset, int length, int accuracy, boolean isReadAccess, boolean isWriteAccess, boolean isJavadoc, boolean isSuperInvocation) {
27         super(element, offset, length);
28         fAccuracy= accuracy;
29         fMatchRule= matchRule;
30         fIsWriteAccess= isWriteAccess;
31         fIsReadAccess= isReadAccess;
32         fIsJavadoc= isJavadoc;
33         fIsSuperInvocation= isSuperInvocation;
34     }
35
36     public int getAccuracy() {
37         return fAccuracy;
38     }
39
40     public boolean isWriteAccess() {
41         return fIsWriteAccess;
42     }
43
44     public boolean isReadAccess() {
45         return fIsReadAccess;
46     }
47
48     public boolean isJavadoc() {
49         return fIsJavadoc;
50     }
51     
52     public boolean isSuperInvocation() {
53         return fIsSuperInvocation;
54     }
55     
56     public int getMatchRule() {
57         return fMatchRule;
58     }
59 }
60
Popular Tags