Clover coverage report - Code Coverage for hivemind release 1.1-beta-1
Coverage timestamp: Thu Apr 28 2005 19:53:41 EDT
file stats: LOC: 108   Methods: 14
NCLOC: 67   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
UtilMessages.java - 78.6% 78.6% 78.6%
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.hivemind.util;
 16   
 
 17   
 import java.lang.reflect.Constructor;
 18   
 import java.net.MalformedURLException;
 19   
 
 20   
 import org.apache.hivemind.impl.MessageFormatter;
 21   
 
 22   
 /**
 23   
  * Messages for the util package.
 24   
  * 
 25   
  * @author Howard Lewis Ship
 26   
  */
 27   
 final class UtilMessages
 28   
 {
 29   
     private static final MessageFormatter _formatter = new MessageFormatter(UtilMessages.class,
 30   
             "UtilStrings");
 31   
 
 32  2
     public static String noSuchProperty(Object target, String propertyName)
 33   
     {
 34  2
         return _formatter.format("no-such-property", target.getClass().getName(), propertyName);
 35   
     }
 36   
 
 37  0
     public static String noMatchingConstructor(Class targetClass)
 38   
     {
 39  0
         return _formatter.format("no-matching-constructor", targetClass.getName());
 40   
     }
 41   
 
 42  2
     public static String invokeFailed(Constructor constructor, Throwable cause)
 43   
     {
 44  2
         return _formatter.format("invoke-failed", constructor.getDeclaringClass().getName(), cause);
 45   
     }
 46   
 
 47  1
     public static String noPropertyWriter(String propertyName, Object target)
 48   
     {
 49  1
         return _formatter.format("no-writer", propertyName, target);
 50   
     }
 51   
 
 52  2
     public static String writeFailure(String propertyName, Object target, Throwable cause)
 53   
     {
 54  2
         return _formatter.format("write-failure", new Object[]
 55   
         { propertyName, target, cause });
 56   
     }
 57   
 
 58  1
     public static String noReader(String propertyName, Object target)
 59   
     {
 60  1
         return _formatter.format("no-reader", propertyName, target);
 61   
     }
 62   
 
 63  1
     public static String readFailure(String propertyName, Object target, Throwable cause)
 64   
     {
 65  1
         return _formatter.format("read-failure", propertyName, target, cause);
 66   
     }
 67   
 
 68  1
     public static String nullObject()
 69   
     {
 70  1
         return _formatter.getMessage("null-object");
 71   
     }
 72   
 
 73  1
     public static String unableToIntrospect(Class targetClass, Throwable cause)
 74   
     {
 75  1
         return _formatter.format("unable-to-introspect", targetClass.getName(), cause);
 76   
     }
 77   
 
 78  0
     public static String badFileURL(String path, Throwable cause)
 79   
     {
 80  0
         return _formatter.format("bad-file-url", path, cause);
 81   
     }
 82   
 
 83  0
     public static String unableToReferenceContextPath(String path, MalformedURLException ex)
 84   
     {
 85  0
         return _formatter.format("unable-to-reference-context-path", path, ex);
 86   
     }
 87   
 
 88   
     /** @since 1.1 */
 89  1
     public static String noPropertyEditor(String propertyName, Class targetClass)
 90   
     {
 91  1
         return _formatter.format("no-property-editor", propertyName, targetClass.getName());
 92   
     }
 93   
 
 94   
     /** @since 1.1 */
 95  2
     public static String unableToConvert(String value, Class propertyType,
 96   
 
 97   
     String propertyName, Object target, Throwable cause)
 98   
     {
 99  2
         return _formatter.format("unable-to-convert", new Object[]
 100   
         { value, propertyType.getName(), propertyName, target, cause });
 101   
     }
 102   
 
 103   
     /** @since 1.1 */
 104  4
     public static String unableToInstantiateInstanceOfClass(Class clazz, Throwable cause)
 105   
     {
 106  4
         return _formatter.format("unable-to-instantiate-instance-of-class", clazz.getName(), cause);
 107   
     }
 108   
 }