KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-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 AccessorClassInfo {
19     
20     private ITypeBinding fBinding;
21     private Region fRegion;
22     
23     public AccessorClassInfo(ITypeBinding typeBinding, Region accessorRegion) {
24         super();
25         fBinding = typeBinding;
26         fRegion = accessorRegion;
27     }
28     
29     public ITypeBinding getBinding() {
30         return fBinding;
31     }
32
33     public String JavaDoc getName() {
34         return fBinding.getName();
35     }
36
37     public Region getRegion() {
38         return fRegion;
39     }
40     
41     public boolean equals(Object JavaDoc obj) {
42         if (obj instanceof AccessorClassInfo) {
43             AccessorClassInfo cmp = (AccessorClassInfo) obj;
44             return fBinding == cmp.fBinding;
45         }
46         return false;
47     }
48     
49     public int hashCode() {
50         return fBinding.hashCode();
51     }
52 }
53
Popular Tags