Clover coverage report - PLT Utilities Test Coverage (plt-20120304-r5436)
Coverage timestamp: Sat Mar 3 2012 22:01:56 CST
file stats: LOC: 136   Methods: 23
NCLOC: 73   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
StandardLog.java - 30.4% 30.4% 30.4%
coverage coverage
 1    /*BEGIN_COPYRIGHT_BLOCK*
 2   
 3    PLT Utilities BSD License
 4   
 5    Copyright (c) 2007-2010 JavaPLT group at Rice University
 6    All rights reserved.
 7   
 8    Developed by: Java Programming Languages Team
 9    Rice University
 10    http://www.cs.rice.edu/~javaplt/
 11   
 12    Redistribution and use in source and binary forms, with or without modification, are permitted
 13    provided that the following conditions are met:
 14   
 15    - Redistributions of source code must retain the above copyright notice, this list of conditions
 16    and the following disclaimer.
 17    - Redistributions in binary form must reproduce the above copyright notice, this list of
 18    conditions and the following disclaimer in the documentation and/or other materials provided
 19    with the distribution.
 20    - Neither the name of the JavaPLT group, Rice University, nor the names of the library's
 21    contributors may be used to endorse or promote products derived from this software without
 22    specific prior written permission.
 23   
 24    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
 25    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 26    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND
 27    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 28    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 29    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 30    IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 31    OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 32   
 33    *END_COPYRIGHT_BLOCK*/
 34   
 35    package edu.rice.cs.plt.debug;
 36   
 37    import edu.rice.cs.plt.debug.LogSink.*;
 38   
 39    /** A log that acts as a front end for a LogSink. */
 40    public class StandardLog implements Log {
 41   
 42    private static final String[] EMPTY = new String[0];
 43   
 44    private final LogSink _sink;
 45   
 46  7 public StandardLog(LogSink sink) { _sink = sink; }
 47   
 48  0 public void log() {
 49  0 _sink.log(new StandardMessage(new ThreadSnapshot(), EMPTY, EMPTY));
 50    }
 51   
 52  3 public void log(String message) {
 53  3 _sink.log(new StandardMessage(new ThreadSnapshot(), message, EMPTY, EMPTY));
 54    }
 55   
 56  3 public void log(Throwable t) {
 57  3 _sink.logError(new ErrorMessage(new ThreadSnapshot(), t));
 58    }
 59   
 60  0 public void log(String message, Throwable t) {
 61  0 _sink.logError(new ErrorMessage(new ThreadSnapshot(), message, t));
 62    }
 63   
 64  0 public void logEnd() {
 65  0 _sink.logEnd(new EndMessage(new ThreadSnapshot(), EMPTY, EMPTY));
 66    }
 67   
 68  0 public void logEnd(String message) {
 69  0 _sink.logEnd(new EndMessage(new ThreadSnapshot(), message, EMPTY, EMPTY));
 70    }
 71   
 72  3 public void logEnd(String name, Object value) {
 73  3 _sink.logEnd(new EndMessage(new ThreadSnapshot(), new String[]{ name }, new Object[]{ value }));
 74    }
 75   
 76  0 public void logEnd(String message, String name, Object value) {
 77  0 _sink.logEnd(new EndMessage(new ThreadSnapshot(), message, new String[]{ name }, new Object[]{ value }));
 78    }
 79   
 80  0 public void logEnd(String[] names, Object... values) {
 81  0 _sink.logEnd(new EndMessage(new ThreadSnapshot(), names, values));
 82    }
 83   
 84  0 public void logEnd(String message, String[] names, Object... values) {
 85  0 _sink.logEnd(new EndMessage(new ThreadSnapshot(), message, names, values));
 86    }
 87   
 88  3 public void logStack() {
 89  3 _sink.logStack(new StackMessage(new ThreadSnapshot()));
 90    }
 91   
 92  0 public void logStack(String message) {
 93  0 _sink.logStack(new StackMessage(new ThreadSnapshot(), message));
 94    }
 95   
 96  3 public void logStart() {
 97  3 _sink.logStart(new StartMessage(new ThreadSnapshot(), EMPTY, EMPTY));
 98    }
 99   
 100  0 public void logStart(String message) {
 101  0 _sink.logStart(new StartMessage(new ThreadSnapshot(), message, EMPTY, EMPTY));
 102    }
 103   
 104  0 public void logStart(String name, Object value) {
 105  0 _sink.logStart(new StartMessage(new ThreadSnapshot(), new String[]{ name }, new Object[]{ value }));
 106    }
 107   
 108  0 public void logStart(String message, String name, Object value) {
 109  0 _sink.logStart(new StartMessage(new ThreadSnapshot(), message, new String[]{ name }, new Object[]{ value }));
 110    }
 111   
 112  0 public void logStart(String[] names, Object... values) {
 113  0 _sink.logStart(new StartMessage(new ThreadSnapshot(), names, values));
 114    }
 115   
 116  0 public void logStart(String message, String[] names, Object... values) {
 117  0 _sink.logStart(new StartMessage(new ThreadSnapshot(), message, names, values));
 118    }
 119   
 120  0 public void logValue(String name, Object value) {
 121  0 _sink.log(new StandardMessage(new ThreadSnapshot(), new String[]{ name }, new Object[]{ value }));
 122    }
 123   
 124  0 public void logValue(String message, String name, Object value) {
 125  0 _sink.log(new StandardMessage(new ThreadSnapshot(), message, new String[]{ name }, new Object[]{ value }));
 126    }
 127   
 128  3 public void logValues(String[] names, Object... values) {
 129  3 _sink.log(new StandardMessage(new ThreadSnapshot(), names, values));
 130    }
 131   
 132  0 public void logValues(String message, String[] names, Object... values) {
 133  0 _sink.log(new StandardMessage(new ThreadSnapshot(), message, names, values));
 134    }
 135   
 136    }