]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2000, 2011 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 fResourceBundleName; | |
23 | ||
24 | public AccessorClassReference(ITypeBinding typeBinding, String 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 getName() { | |
36 | return fBinding.getName(); | |
37 | } | |
38 | ||
39 | public Region getRegion() { | |
40 | return fRegion; | |
41 | } | |
42 | ||
43 | public String getResourceBundleName() { | |
44 | return fResourceBundleName; | |
45 | } | |
46 | ||
47 | @Override | |
48 | public boolean equals(Object obj) { | |
49 | if (obj instanceof AccessorClassReference) { | |
50 | AccessorClassReference cmp = (AccessorClassReference) obj; | |
51 | return fBinding == cmp.fBinding; | |
52 | } | |
53 | return false; | |
54 | } | |
55 | ||
56 | @Override | |
57 | public int hashCode() { | |
58 | return fBinding.hashCode(); | |
59 | } | |
60 | } |