Clover coverage report - Code Coverage for tapestry release 4.0-alpha-3
Coverage timestamp: Mon May 16 2005 09:05:49 EDT
file stats: LOC: 162   Methods: 26
NCLOC: 91   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
NullWriter.java 100% 57.1% 46.2% 51.4%
coverage coverage
 1   
 // Copyright 2004, 2005 The Apache Software Foundation
 2   
 //
 3   
 // Licensed under the Apache License, Version 2.0 (the "License");
 4   
 // you may not use this file except in compliance with the License.
 5   
 // You may obtain a copy of the License at
 6   
 //
 7   
 //     http://www.apache.org/licenses/LICENSE-2.0
 8   
 //
 9   
 // Unless required by applicable law or agreed to in writing, software
 10   
 // distributed under the License is distributed on an "AS IS" BASIS,
 11   
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12   
 // See the License for the specific language governing permissions and
 13   
 // limitations under the License.
 14   
 
 15   
 package org.apache.tapestry.engine;
 16   
 
 17   
 import org.apache.tapestry.IMarkupWriter;
 18   
 import org.apache.tapestry.NestedMarkupWriter;
 19   
 
 20   
 /**
 21   
  * A {@link IMarkupWriter}that does absolutely <em>nothing</em>; this is used during the rewind
 22   
  * phase of the request cycle when output is discarded anyway.
 23   
  * 
 24   
  * @author Howard Lewis Ship, David Solis
 25   
  * @since 0.2.9
 26   
  */
 27   
 
 28   
 public class NullWriter implements NestedMarkupWriter
 29   
 {
 30   
     private static IMarkupWriter shared;
 31   
 
 32  36
     public static IMarkupWriter getSharedInstance()
 33   
     {
 34  36
         if (shared == null)
 35  1
             shared = new NullWriter();
 36   
 
 37  36
         return shared;
 38   
     }
 39   
 
 40  0
     public String getBuffer()
 41   
     {
 42  0
         return null;
 43   
     }
 44   
 
 45  222
     public void printRaw(char[] buffer, int offset, int length)
 46   
     {
 47   
     }
 48   
 
 49  0
     public void printRaw(String value)
 50   
     {
 51   
     }
 52   
 
 53  30
     public void println()
 54   
     {
 55   
     }
 56   
 
 57  0
     public void print(char[] data, int offset, int length)
 58   
     {
 59   
     }
 60   
 
 61  0
     public void print(char value)
 62   
     {
 63   
     }
 64   
 
 65  0
     public void print(int value)
 66   
     {
 67   
     }
 68   
 
 69  4
     public void print(String value)
 70   
     {
 71   
     }
 72   
 
 73   
     /**
 74   
      * Returns <code>this</code>: since a NullWriter doesn't actually do anything, one is as good
 75   
      * as another!.
 76   
      */
 77   
 
 78  15
     public NestedMarkupWriter getNestedWriter()
 79   
     {
 80  15
         return this;
 81   
     }
 82   
 
 83  0
     public String getContentType()
 84   
     {
 85  0
         return null;
 86   
     }
 87   
 
 88  0
     public void flush()
 89   
     {
 90   
     }
 91   
 
 92  18
     public void end()
 93   
     {
 94   
     }
 95   
 
 96  0
     public void end(String name)
 97   
     {
 98   
     }
 99   
 
 100  0
     public void comment(String value)
 101   
     {
 102   
     }
 103   
 
 104  1
     public void closeTag()
 105   
     {
 106   
     }
 107   
 
 108  8
     public void close()
 109   
     {
 110   
     }
 111   
 
 112   
     /**
 113   
      * Always returns false.
 114   
      */
 115   
 
 116  0
     public boolean checkError()
 117   
     {
 118  0
         return false;
 119   
     }
 120   
 
 121  27
     public void beginEmpty(String name)
 122   
     {
 123   
     }
 124   
 
 125  20
     public void begin(String name)
 126   
     {
 127   
     }
 128   
 
 129  4
     public void attribute(String name, int value)
 130   
     {
 131   
     }
 132   
 
 133  104
     public void attribute(String name, String value)
 134   
     {
 135   
     }
 136   
 
 137   
     /**
 138   
      * @see org.apache.tapestry.IMarkupWriter#attribute(java.lang.String, boolean)
 139   
      * @since 3.0
 140   
      */
 141   
 
 142  0
     public void attribute(String name, boolean value)
 143   
     {
 144   
     }
 145   
 
 146   
     /**
 147   
      * @see org.apache.tapestry.IMarkupWriter#attributeRaw(java.lang.String, java.lang.String)
 148   
      * @since 3.0
 149   
      */
 150   
 
 151  0
     public void attributeRaw(String name, String value)
 152   
     {
 153   
     }
 154   
 
 155  0
     public void print(char[] data, int offset, int length, boolean raw)
 156   
     {
 157   
     }
 158   
 
 159  0
     public void print(String value, boolean raw)
 160   
     {
 161   
     }
 162   
 }