EMMA Coverage Report (generated Tue Aug 23 05:57:12 CDT 2011)
[all classes][felix.society]

COVERAGE SUMMARY FOR SOURCE FILE [Worker.java]

nameclass, %method, %block, %line, %
Worker.java100% (1/1)33%  (1/3)63%  (12/19)62%  (5/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Worker100% (1/1)33%  (1/3)63%  (12/19)62%  (5/8)
getException (): Exception 0%   (0/1)0%   (0/3)0%   (0/1)
submitException (Exception): void 0%   (0/1)0%   (0/4)0%   (0/2)
Worker (): void 100% (1/1)100% (12/12)100% (5/5)

1package felix.society;
2 
3import tuffy.util.Config;
4 
5 
6/**
7 * A worker is a Runnable object generated by Task/TaskList/TaskWorker.
8 * @author czhang
9 *
10 */
11public abstract class Worker implements Runnable{
12 
13        /**
14         * Exception collected
15         */
16        private Exception e = null;
17        
18        /**
19         * ID
20         */
21        protected int id = -1;
22        
23        /**
24         * Constructor -- the ID is assigned here.
25         */
26        public Worker(){
27                this.id = Config.getNextGlobalCounter();
28        }
29        
30        /**
31         * If there are exceptions collected while running
32         * this Worker, return it.
33         * @return
34         */
35        public Exception getException(){
36                return e;
37        }
38        
39        /**
40         * Collect exceptions while running (we cannot
41         * throw exceptions in run())
42         * @param _e
43         */
44        public void submitException(Exception _e){
45                this.e = _e;
46        }
47        
48        /**
49         * Run!!!!
50         */
51        public abstract void run();
52        
53}

[all classes][felix.society]
EMMA 2.0.5312 EclEmma Fix 2 (C) Vladimir Roubtsov