Clover coverage report - Code Coverage for tapestry release 3.1-alpha-1
Coverage timestamp: Mon Feb 21 2005 09:16:14 EST
file stats: LOC: 154   Methods: 23
NCLOC: 80   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% 66.7% 52.2% 58.1%
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   
 
 19   
 /**
 20   
  *  A {@link IMarkupWriter} that does absolutely <em>nothing</em>; this
 21   
  *  is used during the rewind phase of the request cycle when output
 22   
  *  is discarded anyway.
 23   
  *
 24   
  *  @author Howard Lewis Ship, David Solis
 25   
  *  @since 0.2.9
 26   
  *
 27   
  **/
 28   
 
 29   
 public class NullWriter implements IMarkupWriter
 30   
 {
 31   
     private static IMarkupWriter shared;
 32   
 
 33  39
     public static IMarkupWriter getSharedInstance()
 34   
     {
 35  39
         if (shared == null)
 36  1
             shared = new NullWriter();
 37   
 
 38  39
         return shared;
 39   
     }
 40   
 
 41  246
     public void printRaw(char[] buffer, int offset, int length)
 42   
     {
 43   
     }
 44   
 
 45  0
     public void printRaw(String value)
 46   
     {
 47   
     }
 48   
 
 49  3
     public void println()
 50   
     {
 51   
     }
 52   
 
 53  0
     public void print(char[] data, int offset, int length)
 54   
     {
 55   
     }
 56   
 
 57  0
     public void print(char value)
 58   
     {
 59   
     }
 60   
 
 61  0
     public void print(int value)
 62   
     {
 63   
     }
 64   
 
 65  4
     public void print(String value)
 66   
     {
 67   
     }
 68   
 
 69   
     /**
 70   
      *  Returns <code>this</code>: since a NullWriter doesn't actually
 71   
      *  do anything, one is as good as another!.
 72   
      *
 73   
      **/
 74   
 
 75  54
     public IMarkupWriter getNestedWriter()
 76   
     {
 77  54
         return this;
 78   
     }
 79   
 
 80  0
     public String getContentType()
 81   
     {
 82  0
         return null;
 83   
     }
 84   
 
 85  0
     public void flush()
 86   
     {
 87   
     }
 88   
 
 89  13
     public void end()
 90   
     {
 91   
     }
 92   
 
 93  0
     public void end(String name)
 94   
     {
 95   
     }
 96   
 
 97  0
     public void comment(String value)
 98   
     {
 99   
     }
 100   
 
 101  1
     public void closeTag()
 102   
     {
 103   
     }
 104   
 
 105  3
     public void close()
 106   
     {
 107   
     }
 108   
 
 109   
     /**
 110   
      *  Always returns false.
 111   
      *
 112   
      **/
 113   
 
 114  0
     public boolean checkError()
 115   
     {
 116  0
         return false;
 117   
     }
 118   
 
 119  5
     public void beginEmpty(String name)
 120   
     {
 121   
     }
 122   
 
 123  15
     public void begin(String name)
 124   
     {
 125   
     }
 126   
 
 127  4
     public void attribute(String name, int value)
 128   
     {
 129   
     }
 130   
 
 131  27
     public void attribute(String name, String value)
 132   
     {
 133   
     }
 134   
 
 135   
     /**
 136   
      *  @see org.apache.tapestry.IMarkupWriter#attribute(java.lang.String, boolean)
 137   
      *
 138   
      *  @since 3.0
 139   
      **/
 140   
 
 141  0
     public void attribute(String name, boolean value)
 142   
     {
 143   
     }
 144   
 
 145   
     /**
 146   
      *  @see org.apache.tapestry.IMarkupWriter#attributeRaw(java.lang.String, java.lang.String)
 147   
      *
 148   
      *  @since 3.0
 149   
      **/
 150   
 
 151  0
     public void attributeRaw(String name, String value)
 152   
     {
 153   
     }
 154   
 }