KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > ba > ca > Call


1 /*
2  * Bytecode Analysis Framework
3  * Copyright (C) 2005, University of Maryland
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package edu.umd.cs.findbugs.ba.ca;
20
21 public class Call {
22     private final String JavaDoc className;
23     private final String JavaDoc methodName;
24     private final String JavaDoc methodSig;
25     
26     public Call(String JavaDoc className, String JavaDoc methodName, String JavaDoc methodSig) {
27         this.className = className;
28         this.methodName= methodName;
29         this.methodSig = methodSig;
30     }
31     
32     public String JavaDoc getClassName() {
33         return className;
34     }
35     
36     public String JavaDoc getMethodName() {
37         return methodName;
38     }
39     
40     public String JavaDoc getMethodSig() {
41         return methodSig;
42     }
43     
44     //@Override
45
@Override JavaDoc
46          public boolean equals(Object JavaDoc obj) {
47         if (obj == null || obj.getClass() != this.getClass())
48             return false;
49         Call other = (Call) obj;
50         return this.className.equals(other.className)
51             && this.methodName.equals(other.methodName)
52             && this.methodSig.equals(other.methodSig);
53     }
54     
55     //@Override
56
@Override JavaDoc
57          public int hashCode() {
58         return className.hashCode() + methodName.hashCode() + methodSig.hashCode();
59     }
60 }
61
Popular Tags