net.sourceforge.groboutils.codecoverage.v2.logger
Class DirectoryChannelLogger

java.lang.Object
  extended bynet.sourceforge.groboutils.codecoverage.v2.logger.DirectoryChannelLogger
All Implemented Interfaces:
IChannelLogger
Direct Known Subclasses:
CacheDirChannelLogger, MinDirChannelLogger

public class DirectoryChannelLogger
extends java.lang.Object
implements IChannelLogger

Logs coverage reports to a directory of logs. The directories are split by the channel index, and the directory contains one log per class file analyzed.

As of 2004-Jun-3, the output format has changed to:

    method index mark index EOL
 
where both indices are output in hexidecimal format. This is for performance reasons.

Since:
December 17, 2002
Version:
$Date: 2004/07/07 09:39:10 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Field Summary
protected  java.io.File baseDir
           
static java.lang.String CLASS_LOG_EXTENTION
           
 
Constructor Summary
DirectoryChannelLogger(java.io.File baseDir)
           
 
Method Summary
 void cover(java.lang.String classSignature, short methodIndex, short markIndex)
          Records a coverage of a marked bytecode instruction.
protected static char[] createCoverString(short methodIndex, short markIndex)
          Make static final so that the invocation time is minimized.
protected static java.io.File getClassFile(java.io.File basedir, java.lang.String classSignature)
          Make static final so that the invocation time is minimized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_LOG_EXTENTION

public static final java.lang.String CLASS_LOG_EXTENTION
See Also:
Constant Field Values

baseDir

protected java.io.File baseDir
Constructor Detail

DirectoryChannelLogger

public DirectoryChannelLogger(java.io.File baseDir)
Method Detail

cover

public void cover(java.lang.String classSignature,
                  short methodIndex,
                  short markIndex)
Records a coverage of a marked bytecode instruction. This method should never throw an exception.

Specified by:
cover in interface IChannelLogger
Parameters:
classSignature - a signature of the class file being covered. this signature includes the fully-qualified name of the class, along with a checksum to uniquely identify it.
methodIndex - index for a method within the class. The meta-data store will know how to translate the index to a method signature.
markIndex - the index of the bytecode instruction mark for this particular channel.

createCoverString

protected static final char[] createCoverString(short methodIndex,
                                                short markIndex)
Make static final so that the invocation time is minimized.

This now returns a character array, for performance reasons. The array's format is in hexidecimal.


getClassFile

protected static final java.io.File getClassFile(java.io.File basedir,
                                                 java.lang.String classSignature)
Make static final so that the invocation time is minimized.



Copyright © 2001-2003 by The GroboUtils Project