Clover coverage report - Code Coverage for tapestry release 4.0.2
Coverage timestamp: Thu Apr 13 2006 10:52:06 EDT
file stats: LOC: 202   Methods: 32
NCLOC: 147   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ParseMessages.java - 71.9% 71.9% 71.9%
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.parse;
 16   
 17    import org.apache.hivemind.HiveMind;
 18    import org.apache.hivemind.Location;
 19    import org.apache.hivemind.Resource;
 20    import org.apache.hivemind.impl.MessageFormatter;
 21   
 22    /**
 23    * Localized messages for the org.apache.tapestry.parse package.
 24    *
 25    * @author Howard Lewis Ship
 26    * @since 4.0
 27    */
 28    class ParseMessages
 29    {
 30    private final static MessageFormatter _formatter = new MessageFormatter(ParseMessages.class);
 31   
 32  1 static String commentNotEnded(int line)
 33    {
 34  1 return _formatter.format("comment-not-ended", new Integer(line));
 35    }
 36   
 37  0 static String unclosedUnknownTag(int line)
 38    {
 39  0 return _formatter.format("unclosed-unknown-tag", new Integer(line));
 40    }
 41   
 42  1 static String unclosedTag(String tagName, int line)
 43    {
 44  1 return _formatter.format("unclosed-tag", tagName, new Integer(line));
 45    }
 46   
 47  1 static String missingAttributeValue(String tagName, int line, String attributeName)
 48    {
 49  1 return _formatter.format(
 50    "missing-attribute-value",
 51    tagName,
 52    new Integer(line),
 53    attributeName);
 54    }
 55   
 56  3 static String componentMayNotBeIgnored(String tagName, int line)
 57    {
 58  3 return _formatter.format("component-may-not-be-ignored", tagName, new Integer(line));
 59    }
 60   
 61  0 static String componentIdInvalid(String tagName, int line, String jwcid)
 62    {
 63  0 return _formatter.format("component-id-invalid", tagName, new Integer(line), jwcid);
 64    }
 65   
 66  1 static String unknownComponentId(String tagName, int line, String jwcid)
 67    {
 68  1 return _formatter.format("unknown-component-id", tagName, new Integer(line), jwcid);
 69    }
 70   
 71  1 static String nestedIgnore(String tagName, int line)
 72    {
 73  1 return _formatter.format("nested-ignore", tagName, new Integer(line));
 74    }
 75   
 76  1 static String contentBlockMayNotBeIgnored(String tagName, int line)
 77    {
 78  1 return _formatter.format("content-block-may-not-be-ignored", tagName, new Integer(line));
 79    }
 80   
 81  0 static String contentBlockMayNotBeEmpty(String tagName, int line)
 82    {
 83  0 return _formatter.format("content-block-may-not-be-empty", tagName, new Integer(line));
 84    }
 85   
 86  1 static String incompleteCloseTag(int line)
 87    {
 88  1 return _formatter.format("incomplete-close-tag", new Integer(line));
 89    }
 90   
 91  1 static String improperlyNestedCloseTag(String tagName, int closeLine, String startTagName,
 92    int startLine)
 93    {
 94  1 return _formatter.format("improperly-nested-close-tag", new Object[]
 95    { tagName, new Integer(closeLine), startTagName, new Integer(startLine) });
 96    }
 97   
 98  1 static String unmatchedCloseTag(String tagName, int line)
 99    {
 100  1 return _formatter.format("unmatched-close-tag", tagName, new Integer(line));
 101    }
 102   
 103  0 static String failConvertBoolean(String value)
 104    {
 105  0 return _formatter.format("fail-convert-boolean", value);
 106    }
 107   
 108  0 static String failConvertDouble(String value)
 109    {
 110  0 return _formatter.format("fail-convert-double", value);
 111    }
 112   
 113  0 static String failConvertInt(String value)
 114    {
 115  0 return _formatter.format("fail-convert-int", value);
 116    }
 117   
 118  0 static String failConvertLong(String value)
 119    {
 120  0 return _formatter.format("fail-convert-long", value);
 121    }
 122   
 123  1 static String unableToCopy(String id)
 124    {
 125  1 return _formatter.format("unable-to-copy", id);
 126    }
 127   
 128  1 static String bothTypeAndCopyOf(String id)
 129    {
 130  1 return _formatter.format("both-type-and-copy-of", id);
 131    }
 132   
 133  1 static String missingTypeOrCopyOf(String id)
 134    {
 135  1 return _formatter.format("missing-type-or-copy-of", id);
 136    }
 137   
 138  1 static String frameworkLibraryIdIsReserved(String id)
 139    {
 140  1 return _formatter.format("framework-library-id-is-reserved", id);
 141    }
 142   
 143  1 static String incorrectDocumentType(String expected, String actual)
 144    {
 145  1 return _formatter.format("incorrect-document-type", expected, actual);
 146    }
 147   
 148  1 static String noAttributeAndBody(String attributeName, String elementName)
 149    {
 150  1 return _formatter.format("no-attribute-and-body", attributeName, elementName);
 151    }
 152   
 153  1 static String requiredExtendedAttribute(String elementName, String attributeName)
 154    {
 155  1 return _formatter.format("required-extended-attribute", elementName, attributeName);
 156    }
 157   
 158  7 static String invalidAttribute(String key, String value)
 159    {
 160  7 return _formatter.format(key, value);
 161    }
 162   
 163  0 static String missingResource(Resource resource)
 164    {
 165  0 return _formatter.format("missing-resource", resource);
 166    }
 167   
 168  16 static String errorReadingResource(Resource resource, Throwable cause)
 169    {
 170  16 return _formatter.format("error-reading-resource", resource, cause);
 171    }
 172   
 173  1 static String unknownPublicId(Resource resource, String publicId)
 174    {
 175  1 return _formatter.format("unknown-public-id", resource, publicId);
 176    }
 177   
 178  1 static String serviceElementNotSupported()
 179    {
 180  1 return _formatter.getMessage("service-element-not-supported");
 181    }
 182   
 183  0 static String rangeError(TemplateToken token, int length)
 184    {
 185  0 return _formatter.format("range-error", token, new Integer(length));
 186    }
 187   
 188  2 public static String duplicateTagAttribute(String tagName, int line, String attributeName)
 189    {
 190  2 return _formatter.format(
 191    "duplicate-tag-attribute",
 192    tagName,
 193    new Integer(line),
 194    attributeName);
 195    }
 196   
 197  1 public static Object listenerBindingUnsupported(Location location)
 198    {
 199  1 return _formatter.format("listener-binding-unsupported", HiveMind
 200    .getLocationString(location));
 201    }
 202    }