1 /* 2 * @(#)IAnalysisModule.java 3 * 4 * Copyright (C) 2002-2003 Matt Albrecht 5 * groboclown@users.sourceforge.net 6 * http://groboutils.sourceforge.net 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a 9 * copy of this software and associated documentation files (the "Software"), 10 * to deal in the Software without restriction, including without limitation 11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 * and/or sell copies of the Software, and to permit persons to whom the 13 * Software is furnished to do so, subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice shall be included in 16 * all copies or substantial portions of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 * DEALINGS IN THE SOFTWARE. 25 */ 26 27 package net.sourceforge.groboutils.codecoverage.v2; 28 29 30 /** 31 * Processes a method for coverage analysis. The analysis should mark 32 * certain bytecode instructions with <tt>IAnalysisMetaData</tt> for 33 * report generation. Each module generates data that is used for one 34 * specific measure type, such as source line coverage, or branch coverage. 35 * The coverage amount is based on the number of marks added verses the 36 * number of marks (and which ones) encountered during a run. 37 * 38 * @author Matt Albrecht <a HREF="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a> 39 * @version $Date: 2003/02/10 22:51:25 $ 40 * @since December 15, 2002 41 * @see IAnalysisMetaData 42 */ 43 public interface IAnalysisModule 44 { 45 /** 46 * Returns the human-readable name of the measure. 47 */ 48 public String getMeasureName(); 49 50 /** 51 * Returns the unit name for this particular coverage measure. 52 */ 53 public String getMeasureUnit(); 54 55 56 /** 57 * Returns the text format used in meta-data formatted text. This should 58 * be the mime encoding type, such as "text/plain" or "text/html". 59 */ 60 public String getMimeEncoding(); 61 62 63 /** 64 * Perform the analysis on the method. <tt>method</tt> should never 65 * be <tt>null</tt>, so null checking isn't necessary; 66 * <tt>NullPointerException</tt>s are an acceptable exception to be 67 * thrown from this method. 68 */ 69 public void analyze( IMethodCode method ); 70 } 71 72