EMMA Coverage Report (generated Thu Nov 26 15:54:18 CST 2009)
[all classes][org.eclipse.pde.api.tools.internal.model]

COVERAGE SUMMARY FOR SOURCE FILE [MethodKey.java]

nameclass, %method, %block, %line, %
MethodKey.java100% (1/1)75%  (3/4)64%  (37/58)62%  (8.6/14)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MethodKey100% (1/1)75%  (3/4)64%  (37/58)62%  (8.6/14)
toString (): String 0%   (0/1)0%   (0/17)0%   (0/4)
equals (Object): boolean 100% (1/1)83%  (20/24)72%  (3.6/5)
MethodKey (String, String): void 100% (1/1)100% (9/9)100% (4/4)
hashCode (): int 100% (1/1)100% (8/8)100% (1/1)

1/*******************************************************************************
2 * Copyright (c) 2008, 2009 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 *******************************************************************************/
11package org.eclipse.pde.api.tools.internal.model;
12 
13 
14/**
15 * A key for a method - name & signature based.
16 * 
17 * @since 1.1
18 */
19public class MethodKey {
20        private String fSelector;
21        private String fSig;
22        /**
23         * Constructs a new method key
24         * @param name method name
25         * @param sig method signature
26         */
27        public MethodKey(String name, String sig) {
28                fSelector = name;
29                fSig = sig;
30        }
31        /* (non-Javadoc)
32         * @see java.lang.Object#equals(java.lang.Object)
33         */
34        public boolean equals(Object obj) {
35                if (obj instanceof MethodKey) {
36                        MethodKey key = (MethodKey) obj;
37                        return fSelector.equals(key.fSelector) &&
38                         fSig.equals(key.fSig);
39                }
40                return false;
41        }
42        /* (non-Javadoc)
43         * @see java.lang.Object#hashCode()
44         */
45        public int hashCode() {
46                return fSelector.hashCode() + fSig.hashCode();
47        }
48        
49        /* (non-Javadoc)
50         * @see java.lang.Object#toString()
51         */
52        public String toString() {
53                StringBuffer buf = new StringBuffer();
54                buf.append(fSelector);
55                buf.append(fSig);
56                return buf.toString();
57        }
58}

[all classes][org.eclipse.pde.api.tools.internal.model]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov