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

java.lang.Object
  extended bynet.sourceforge.groboutils.codecoverage.v2.logger.CoverageLogger
All Implemented Interfaces:
ICoverageLoggerConst

public final class CoverageLogger
extends java.lang.Object
implements ICoverageLoggerConst

The singleton invoked at runtime to log each marked bytecode instruction covered.

This class needs to be fast, efficient, thread-safe, and classloader-safe. "Classloader-safe" means that it needs to be resiliant to multiple instances of this class being loaded, and possibly interfering with each other.

As of 12-Feb-2003, this class loads up its properties from a property file, in the same way that Log4J loads its properties. It attempts to load the property file "/grobocoverage.properties" from the system resources. If the file cannot be found, then a warning is displayed to STDERR.

Since:
December 15, 2002
Version:
$Date: 2003/05/30 00:06:03 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Field Summary
 
Fields inherited from interface net.sourceforge.groboutils.codecoverage.v2.logger.ICoverageLoggerConst
COVERAGE_RETURNTYPE, COVERAGE_SIGNATURE, COVERAGELOGGER_CLASSNAME, INVOKE_METHOD_NAME
 
Constructor Summary
CoverageLogger()
           
 
Method Summary
static void cover(java.lang.String classSig, short methodIndex, short channel, short markIndex)
          The primary entry method.
static void init(java.util.Properties props)
          Initializes or reinitializes the static logger object with a specific set of properties.
static void initBase()
          Initializes or reinitializes the static logger object based on the logger property file, which will be used as the argument to init( Properties ).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoverageLogger

public CoverageLogger()
Method Detail

cover

public static final void cover(java.lang.String classSig,
                               short methodIndex,
                               short channel,
                               short markIndex)
The primary entry method. This must be lean, mean, thread-safe, and classloader-safe.


initBase

public static final void initBase()
Initializes or reinitializes the static logger object based on the logger property file, which will be used as the argument to init( Properties ). If no such file is found, then a warning is reported to STDERR, and the System properties are passed into the init method.


init

public static final void init(java.util.Properties props)
Initializes or reinitializes the static logger object with a specific set of properties.

Parameters:
props - collection of properties used to discover the channel logger factory, and to initialize the new channel logger.


Copyright © 2001-2003 by The GroboUtils Project