KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > refactoring > nls > AccessorClassReference


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.corext.refactoring.nls;
12
13 import org.eclipse.jface.text.Region;
14
15 import org.eclipse.jdt.core.dom.ITypeBinding;
16
17
18 public class AccessorClassReference {
19     
20     private ITypeBinding fBinding;
21     private Region fRegion;
22     private String JavaDoc fResourceBundleName;
23     
24     public AccessorClassReference(ITypeBinding typeBinding, String JavaDoc resourceBundleName, Region accessorRegion) {
25         super();
26         fBinding= typeBinding;
27         fRegion= accessorRegion;
28         fResourceBundleName= resourceBundleName;
29     }
30     
31     public ITypeBinding getBinding() {
32         return fBinding;
33     }
34
35     public String JavaDoc getName() {
36         return fBinding.getName();
37     }
38
39     public Region getRegion() {
40         return fRegion;
41     }
42     
43     public String JavaDoc getResourceBundleName() {
44         return fResourceBundleName;
45     }
46     
47     public boolean equals(Object JavaDoc obj) {
48         if (obj instanceof AccessorClassReference) {
49             AccessorClassReference cmp = (AccessorClassReference) obj;
50             return fBinding == cmp.fBinding;
51         }
52         return false;
53     }
54     
55     public int hashCode() {
56         return fBinding.hashCode();
57     }
58 }
59
Popular Tags