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: 101   Methods: 11
NCLOC: 65   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
EnhanceMessages.java - 90.9% 90.9% 90.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.enhance;
 16   
 
 17   
 import java.lang.reflect.Constructor;
 18   
 import java.lang.reflect.Method;
 19   
 
 20   
 import org.apache.hivemind.impl.MessageFormatter;
 21   
 import org.apache.hivemind.service.ClassFabUtils;
 22   
 
 23   
 /**
 24   
  * Messages for this package.
 25   
  * 
 26   
  * @author Howard Lewis Ship
 27   
  * @since 4.0
 28   
  */
 29   
 class EnhanceMessages
 30   
 {
 31   
     protected static MessageFormatter _formatter = new MessageFormatter(EnhanceMessages.class,
 32   
             "EnhanceStrings");
 33   
 
 34  1
     static String noImplForAbstractMethod(Method method, Class declareClass, String className,
 35   
             Class enhancedClass)
 36   
     {
 37  1
         return _formatter.format("no-impl-for-abstract-method", new Object[]
 38   
         { method, declareClass.getName(), className, enhancedClass.getName() });
 39   
     }
 40   
 
 41  0
     static String unabelToIntrospectClass(Class targetClass, Throwable cause)
 42   
     {
 43  0
         return _formatter.format("unable-to-introspect-class", targetClass.getName(), cause);
 44   
     }
 45   
 
 46  2
     static String propertyTypeMismatch(Class componentClass, String propertyName,
 47   
             Class actualPropertyType, Class expectedPropertyType)
 48   
     {
 49  2
         return _formatter.format("property-type-mismatch", new Object[]
 50   
         { componentClass.getName(), propertyName,
 51   
                 ClassFabUtils.getJavaClassName(actualPropertyType),
 52   
                 ClassFabUtils.getJavaClassName(expectedPropertyType) });
 53   
     }
 54   
 
 55  15
     static String errorAddingProperty(String propertyName, Class componentClass, Throwable cause)
 56   
     {
 57  15
         return _formatter.format(
 58   
                 "error-adding-property",
 59   
                 propertyName,
 60   
                 componentClass.getName(),
 61   
                 cause);
 62   
     }
 63   
 
 64  7
     static String claimedProperty(String propertyName)
 65   
     {
 66  7
         return _formatter.format("claimed-property", propertyName);
 67   
     }
 68   
 
 69  1
     static String instantiationFailure(Constructor c, Throwable cause)
 70   
     {
 71  1
         return _formatter.format("instantiation-failure", c.getDeclaringClass().getName(), cause);
 72   
     }
 73   
 
 74  1
     static String locatedValueIsNull(String objectReference)
 75   
     {
 76  1
         return _formatter.format("located-value-is-null", objectReference);
 77   
     }
 78   
 
 79  1
     static String incompatibleInjectType(String locator, Object value, Class propertyType)
 80   
     {
 81  1
         return _formatter.format("incompatible-inject-type", locator, value, ClassFabUtils
 82   
                 .getJavaClassName(propertyType));
 83   
     }
 84   
 
 85  7
     static String initialValueForProperty(String propertyName)
 86   
     {
 87  7
         return _formatter.format("initial-value-for-property", propertyName);
 88   
     }
 89   
 
 90  2
     static String unknownInjectType(String propertyName, String injectType)
 91   
     {
 92  2
         return _formatter.format("unknown-inject-type", propertyName, injectType);
 93   
     }
 94   
 
 95  1
     static String wrongTypeForProperty(String propertyName, Class propertyType, Class requiredType)
 96   
     {
 97  1
         return _formatter.format("wrong-type-for-property", propertyName, ClassFabUtils
 98   
                 .getJavaClassName(propertyType), ClassFabUtils.getJavaClassName(requiredType));
 99   
     }
 100   
 
 101   
 }