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

COVERAGE SUMMARY FOR SOURCE FILE [JniMethodCallable.java]

nameclass, %method, %block, %line, %
JniMethodCallable.java0%   (0/1)0%   (0/5)0%   (0/70)0%   (0/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JniMethodCallable0%   (0/1)0%   (0/5)0%   (0/70)0%   (0/15)
JniMethodCallable (Method, int): void 0%   (0/1)0%   (0/10)0%   (0/4)
getJniLessName (): String 0%   (0/1)0%   (0/16)0%   (0/3)
getName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getParameterTypes (): Class [] 0%   (0/1)0%   (0/3)0%   (0/1)
initParameterTypes (int): void 0%   (0/1)0%   (0/38)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.*;
13import com.moesol.generator.core.*;
14 
15public class JniMethodCallable extends MethodCallable {
16    public JniMethodCallable(Method method, int num_me_params) throws ApplyException {
17        super(method);
18        initParameterTypes(num_me_params);
19    }
20    private void initParameterTypes(int num_me_params) throws ApplyException {
21        Class[] params = m_method.getParameterTypes();
22        if (params.length < num_me_params) {
23            throw new ApplyException("JNI method missing me parameter(s): " + getName());
24        }
25        parameter_types = new Class[params.length - num_me_params];
26        System.arraycopy(params, num_me_params, parameter_types, 0, parameter_types.length);
27    }
28    public String getName() {
29        return getJniLessName();
30    }
31    public Class[] getParameterTypes() {
32        return parameter_types;
33    }
34    private String getJniLessName() {
35        if (m_method.getName().startsWith("JNI")) {
36            return m_method.getName().substring(3);
37        } else {
38            return m_method.getName();
39        }
40    }
41    Class[] parameter_types = null;
42}

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