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

COVERAGE SUMMARY FOR SOURCE FILE [DispatchJavaInterface.java]

nameclass, %method, %block, %line, %
DispatchJavaInterface.java100% (1/1)100% (3/3)43%  (23/53)44%  (8/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DispatchJavaInterface100% (1/1)100% (3/3)43%  (23/53)44%  (8/18)
forClass (Class): DispatchJavaInterface 100% (1/1)29%  (12/42)29%  (4/14)
DispatchJavaInterface (): void 100% (1/1)100% (3/3)100% (2/2)
fillInterfaceInfo (Class): void 100% (1/1)100% (8/8)100% (2/2)

1/*
2 * $Id: DispatchJavaInterface.java,v 1.2 2005/12/01 06:10:00 hastings Exp $
3 *
4 * (c) Copyright, Moebius Solutions, Inc., 2004
5 *
6 *                       All Rights Reserved
7 *
8 * This material may be reproduced by or for the U. S. Government
9 * pursuant to the copyright license under the clause at
10 * DFARS 252.227-7014 (OCT 2001).
11 */
12package com.moesol.bindings;
13 
14import com.moesol.bindings.platform_sdk.component_services.GUID;
15 
16public class DispatchJavaInterface extends DispatchJavaCommon {
17 
18        protected DispatchJavaInterface() {
19        }
20 
21        /**
22         * Normally called from JNI code to learn enough information
23         * to lookup the ITypeInfo for the interface.
24         * 
25         * @param c class of the interface
26         * @return DispatchJavaInterface information for {@code c}.
27         */
28        public static DispatchJavaInterface forClass(Class c) {
29                DispatchJavaInterface r = new DispatchJavaInterface();
30                try {
31                        r.fillLibraryInfo(c);
32                        r.fillInterfaceInfo(c);
33                        
34                        return r;
35                } catch (SecurityException e) {
36                        throw new RuntimeException(e);
37                } catch (IllegalArgumentException e) {
38                        throw new RuntimeException(e);
39                } catch (ClassNotFoundException e) {
40                        throw new RuntimeException(e);
41                } catch (NoSuchFieldException e) {
42                        throw new RuntimeException(e);
43                } catch (IllegalAccessException e) {
44                        throw new RuntimeException(e);
45                }
46        }
47        
48        private void fillInterfaceInfo(Class c) throws SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException {
49                setUuid((GUID)getObjectField(c, "IID"));
50        }
51}

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