EMMA Coverage Report (generated Mon Oct 04 21:03:19 MDT 2004)
[all classes][biz.xsoftware.buildtemplate]

COVERAGE SUMMARY FOR SOURCE FILE [Shutdown.java]

nameclass, %method, %block, %line, %
Shutdown.java100% (1/1)100% (3/3)87%  (47/54)88%  (15.9/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Shutdown100% (1/1)100% (3/3)87%  (47/54)88%  (15.9/18)
run (): void 100% (1/1)80%  (24/30)83%  (10/12)
<static initializer> 100% (1/1)92%  (11/12)92%  (0.9/1)
Shutdown (BuildTemplate, RunAnt, boolean): void 100% (1/1)100% (12/12)100% (5/5)

1/*
2 * Created on Sep 22, 2004
3 *
4 * FIXME To change the template for this generated file go to
5 * Window - Preferences - Java - Code Style - Code Templates
6 */
7package biz.xsoftware.buildtemplate;
8 
9import java.util.logging.Level;
10import java.util.logging.Logger;
11 
12 
13public class Shutdown extends Thread {
14        private static final Logger log = Logger.getLogger(Shutdown.class.getName());
15        
16        private BuildTemplate template;
17        private RunAnt ant;
18        private boolean wantCompress;
19        public Shutdown(BuildTemplate template, RunAnt ant, boolean wantCompress) {
20                this.template = template;
21                this.ant = ant;
22                this.wantCompress = wantCompress;
23        }
24        public void run() {
25                System.err.println();
26                System.err.println("Running shutdown hook to recompress template");
27                System.err.println("Powerd by http://buildtemplate.sourceforge.net & ant");
28                System.err.flush();
29                log.info("Running shutdown hook to recompress template");
30                try {
31                        //stop ant if it is running first so it unlocks all the jars 
32                        //we need to delete!
33                        ant.destroy();
34                        
35                        //do we need to wait for ant???
36                        //unextract the template now
37                        if(wantCompress)
38                                template.compress();
39                } catch(Throwable e) {
40                        log.log(Level.WARNING, "Exception on shutdown", e);
41                }
42        }
43}

[all classes][biz.xsoftware.buildtemplate]
EMMA 2.0.4217 (C) Vladimir Roubtsov