1 26 27 package net.sourceforge.groboutils.codecoverage.v2.logger; 28 29 import java.io.File ; 30 import java.io.FileWriter ; 31 import java.io.IOException ; 32 33 import net.sourceforge.groboutils.codecoverage.v2.IChannelLogger; 34 35 36 48 public class StdoutChannelLogger implements IChannelLogger 49 { 50 private short channelIndex; 51 public StdoutChannelLogger( short index ) 52 { 53 this.channelIndex = index; 54 } 55 56 57 69 public void cover( String classSignature, short methodIndex, 70 short markIndex ) 71 { 72 String text = createCoverString( classSignature, methodIndex, 73 markIndex ); 74 System.err.println(text); 75 } 76 77 78 81 protected final String createCoverString( String classSig, 82 short methodIndex, short markIndex ) 83 { 84 StringBuffer sb = new StringBuffer ( "[Cover String: " ); 87 sb.append( this.channelIndex ).append( ',' ). 88 append( classSig ).append( ',' ). 89 append( methodIndex ).append( ',' ). 90 append( markIndex ).append( ']' ); 91 92 String out = sb.toString(); 93 return out; 94 } 95 } 96 97 | Popular Tags |