EMMA Coverage Report (generated Mon Aug 23 17:21:34 CEST 2010)
[all classes][diskCacheV111.pools]

COVERAGE SUMMARY FOR SOURCE FILE [CostCalculationEngine.java]

nameclass, %method, %block, %line, %
CostCalculationEngine.java100% (1/1)67%  (2/3)39%  (27/69)54%  (7/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CostCalculationEngine100% (1/1)67%  (2/3)39%  (27/69)54%  (7/13)
getCostCalculatable (PoolCostInfo): CostCalculatable 0%   (0/1)0%   (0/42)0%   (0/6)
<static initializer> 100% (1/1)100% (8/8)100% (1/1)
CostCalculationEngine (String): void 100% (1/1)100% (19/19)100% (6/6)

1// $Id: CostCalculationEngine.java,v 1.3 2003-08-23 16:53:47 cvs Exp $
2//
3package diskCacheV111.pools ;
4 
5import java.lang.reflect.* ;
6import java.util.* ;
7 
8public class CostCalculationEngine {
9    private Class _class = null ;
10    private Constructor _constructor = null ;
11    private final static Class [] _classArgs = { diskCacheV111.pools.PoolCostInfo.class } ;
12    public CostCalculationEngine( String algorithmClass )
13           throws 
14               ClassNotFoundException ,
15               NoSuchMethodException   {
16    
17       _class = Class.forName(algorithmClass) ;
18       _constructor = _class.getConstructor( _classArgs ) ;
19       
20    }
21    public CostCalculatable getCostCalculatable( PoolCostInfo info )
22           throws MissingResourceException {
23                  
24       Object [] args = { info } ;
25       long started = System.currentTimeMillis() ;
26       
27       try{
28       
29         return (CostCalculatable)_constructor.newInstance( args ) ;
30        
31       }catch(Exception ee ){
32          throw new
33          MissingResourceException( "Can't create cost calculator : "+ee ,
34                                    _class.getName() , info.getPoolName() ) ; 
35       }finally{
36//          System.out.println("newInstance(CostCalculatable) : "+
37//                             (System.currentTimeMillis()-started));
38       }
39    }
40}

[all classes][diskCacheV111.pools]
EMMA 2.0.5312 (C) Vladimir Roubtsov