EMMA Coverage Report (generated Mon Mar 20 21:34:30 PST 2006)
[all classes][com.moesol.generator]

COVERAGE SUMMARY FOR SOURCE FILE [MethodCallable.java]

nameclass, %method, %block, %line, %
MethodCallable.java0%   (0/1)0%   (0/10)0%   (0/80)0%   (0/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MethodCallable0%   (0/1)0%   (0/10)0%   (0/80)0%   (0/19)
MethodCallable (Class, Method): void 0%   (0/1)0%   (0/9)0%   (0/4)
MethodCallable (Method): void 0%   (0/1)0%   (0/6)0%   (0/2)
getDeclaringClass (): Class 0%   (0/1)0%   (0/3)0%   (0/1)
getExceptionTypes (): Class [] 0%   (0/1)0%   (0/4)0%   (0/1)
getModifiers (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getName (): String 0%   (0/1)0%   (0/4)0%   (0/1)
getParameterTypes (): Class [] 0%   (0/1)0%   (0/4)0%   (0/1)
getReturnType (): Class 0%   (0/1)0%   (0/4)0%   (0/1)
isImpl (): boolean 0%   (0/1)0%   (0/10)0%   (0/1)
isOverloaded (): boolean 0%   (0/1)0%   (0/32)0%   (0/6)

1//
2// (c) Copyright, Moebius Solutions, 2002
3//
4//                       All Rights Reserved
5//
6// This material may be reproduced by or for the U. S. Government
7// pursuant to the copyright license under the clause at
8// DFARS 252.227-7013 (OCT 1988).
9//
10package com.moesol.generator;
11 
12import java.lang.reflect.*;
13 
14public class MethodCallable extends Callable {
15    public MethodCallable(Method method) {
16        this(method.getDeclaringClass(), method);
17    }
18    public MethodCallable(Class a_class, Method method) {
19        m_class = a_class;
20        m_method = method;
21    }
22    public Class getDeclaringClass() {
23        return m_class;
24    }
25    public Class getReturnType() {
26        return m_method.getReturnType();
27    }
28    public Class[] getParameterTypes() {
29        return m_method.getParameterTypes();
30    }
31    public Class[] getExceptionTypes() {
32        return m_method.getExceptionTypes();
33    }
34    public String getName() {
35        return m_method.getName();
36    }
37    public int getModifiers() {
38        return m_method.getModifiers();
39    }
40    public boolean isOverloaded() {
41        // TODO inefficient
42        // TODO should only be checking native methods, but method is not marked native yet.
43        // TODO hmm, what to do for overrides?
44        int number = 0;
45        Method all_methods[] = m_method.getDeclaringClass().getDeclaredMethods();
46        for (int i = 0; i < all_methods.length; i++) {
47            if (m_method.getName().equals(all_methods[i].getName())) {
48                number++;
49            }
50        }
51        return number > 1;
52    }
53 
54        public boolean isImpl() {
55                return getName().indexOf('$') != -1;
56        }
57        
58    Class m_class;
59    Method m_method;
60}

[all classes][com.moesol.generator]
EMMA 2.0.5312 (C) Vladimir Roubtsov