Clover coverage report - baseCode - 0.2.5 Coverage timestamp: Tue Apr 12 2005 11:31:58 EDT FRAMES NO FRAMES |
file stats: | LOC: | 43 |  | Methods: | 1
| NCLOC: | 23 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
AbstractFilter.java | - | 85.7% | 100% | 87.5% |

1 |  |
     package baseCode.dataFilter;
2 |  |
3 |  |
     import java.lang.reflect.Constructor;
4 |  |
5 |  |
     import org.apache.commons.logging.Log;
6 |  |
     import org.apache.commons.logging.LogFactory;
7 |  |
8 |  |
     import baseCode.dataStructure.matrix.NamedMatrix;
9 |  |
10 |  |
     /**
11 |  |
      * Base implementation of the filter class. Subclasses must implement the filter() method.
12 |  |
      * <p>
13 |  |
      * Copyright (c) 2004 Columbia University
14 |  |
      * </p>
15 |  |
      *
16 |  |
      * @author Paul Pavlidis
17 |  |
      * @version $Id: AbstractFilter.java,v 1.11 2004/07/27 03:18:58 pavlidis Exp $
18 |  |
      */
19 |  |
20 |  |
     public abstract class AbstractFilter implements Filter {
21 |  |
22 |  |
        protected static final Log log = LogFactory.getLog( AbstractFilter.class );
23 |  |
24 | 18 |
        protected NamedMatrix getOutputMatrix( NamedMatrix data, int numRows,
25 |  |
              int numCols ) {
26 | 18 |
           NamedMatrix returnval = null;
27 |  |
28 | 18 |
           Constructor cr;
29 | 18 |
           try {
30 | 18 |
              cr = data.getClass().getConstructor( new Class[] {
31 |  |
                    int.class, int.class
32 |  |
              } );
33 | 18 |
              returnval = ( NamedMatrix ) cr.newInstance( new Object[] {
34 |  |
                    new Integer( numRows ), new Integer( numCols )
35 |  |
              } );
36 |  |
           } catch ( Exception e ) {
37 | 0 |
              e.printStackTrace();
38 |  |
           }
39 |  |
40 | 18 |
           return returnval;
41 |  |
        }
42 |  |
43 |  |
     }