Clover coverage report - Code Coverage for tapestry release 4.0-alpha-2
Coverage timestamp: Thu May 5 2005 09:57:44 EDT
file stats: LOC: 91   Methods: 9
NCLOC: 57   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 - 88.9% 88.9% 88.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   
     private static final MessageFormatter _formatter = new MessageFormatter(EnhanceMessages.class,
 32   
             "EnhanceStrings");
 33   
 
 34  1
     public static String noImplForAbstractMethod(Method method, Class declareClass,
 35   
             String className, 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
     public static String unabelToIntrospectClass(Class targetClass, Throwable cause)
 42   
     {
 43  0
         return _formatter.format("unable-to-introspect-class", targetClass.getName(), cause);
 44   
     }
 45   
 
 46  2
     public 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   
 
 56  22
     public static String errorAddingProperty(String propertyName, Class componentClass,
 57   
             Throwable cause)
 58   
     {
 59  22
         return _formatter.format(
 60   
                 "error-adding-property",
 61   
                 propertyName,
 62   
                 componentClass.getName(),
 63   
                 cause);
 64   
     }
 65   
 
 66  8
     public static String claimedProperty(String propertyName)
 67   
     {
 68  8
         return _formatter.format("claimed-property", propertyName);
 69   
     }
 70   
 
 71  1
     public static String instantiationFailure(Constructor c, Throwable cause)
 72   
     {
 73  1
         return _formatter.format("instantiation-failure", c.getDeclaringClass().getName(), cause);
 74   
     }
 75   
 
 76  2
     public static String locatedValueIsNull(String objectReference)
 77   
     {
 78  2
         return _formatter.format("located-value-is-null", objectReference);
 79   
     }
 80   
 
 81  2
     public static String incompatibleInjectType(String locator, Object value, Class propertyType)
 82   
     {
 83  2
         return _formatter.format("incompatible-inject-type", locator, value, ClassFabUtils
 84   
                 .getJavaClassName(propertyType));
 85   
     }
 86   
 
 87  9
     public static String initialValueForProperty(String propertyName)
 88   
     {
 89  9
         return _formatter.format("initial-value-for-property", propertyName);
 90   
     }
 91   
 }