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

COVERAGE SUMMARY FOR SOURCE FILE [JavaJniParamsVisitor.java]

nameclass, %method, %block, %line, %
JavaJniParamsVisitor.java0%   (0/1)0%   (0/4)0%   (0/75)0%   (0/21)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JavaJniParamsVisitor0%   (0/1)0%   (0/4)0%   (0/75)0%   (0/21)
JavaJniParamsVisitor (Writer, TranslationContext): void 0%   (0/1)0%   (0/12)0%   (0/5)
getTranslatedParam (Class): String 0%   (0/1)0%   (0/28)0%   (0/4)
visitParamSeparator (Class): void 0%   (0/1)0%   (0/12)0%   (0/5)
visitParamType (Class, int, Class): void 0%   (0/1)0%   (0/23)0%   (0/7)

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//
10/*
11 * $Id: JavaJniParamsVisitor.java,v 1.1.1.5 2004/05/25 20:23:28 hastings Exp $
12 */
13package com.moesol.generator;
14 
15import java.io.*;
16import com.moesol.generator.core.*;
17import com.moesol.generator.printer.*;
18import com.moesol.generator.visitor.*;
19 
20public class JavaJniParamsVisitor implements ParamTypeVisitor{
21    public JavaJniParamsVisitor(Writer out, TranslationContext ctx) {
22        this.out = out;
23        m_trans_ctx = ctx;
24    }
25    public void visitParamType(Class c, int nparam, Class paramType) throws ApplyException {
26        try {
27            out.write(getTranslatedParam(paramType));
28            out.write(" p");
29            out.write(Integer.toString(nparam));
30        } catch (IOException e) {
31            throw new ApplyException(e);
32        }
33    }
34    public void visitParamSeparator(Class c) throws ApplyException {
35        try {
36            out.write(", ");
37        } catch (IOException e) {
38            throw new ApplyException(e);
39        }
40    }
41    private String getTranslatedParam(Class paramType) throws IOException, ApplyException {
42        StringWriter sw = new StringWriter();
43        JavaTypePrinter.getInstance().print(paramType, sw);
44        String r = m_trans_ctx.getProperty("java.jni.param." + sw.toString());
45        return r == null ? sw.toString() : r;
46    }
47    
48    private Writer out;
49    private TranslationContext m_trans_ctx = null;
50}

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