Clover coverage report - Code Coverage for hivemind release 1.0-rc-2
Coverage timestamp: Sat Sep 11 2004 09:09:48 EDT
file stats: LOC: 81   Methods: 10
NCLOC: 48   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 - 80% 80% 80%
coverage coverage
 1   
 //  Copyright 2004 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   
 
 19   
 import org.apache.hivemind.impl.MessageFormatter;
 20   
 
 21   
 /**
 22   
  * Messages for the util package.
 23   
  *
 24   
  * @author Howard Lewis Ship
 25   
  */
 26   
 final class UtilMessages
 27   
 {
 28   
     private static final MessageFormatter _formatter =
 29   
         new MessageFormatter(UtilMessages.class, "UtilStrings");
 30   
 
 31  2
     public static String noSuchProperty(Object target, String propertyName)
 32   
     {
 33  2
         return _formatter.format("no-such-property", target.getClass().getName(), propertyName);
 34   
     }
 35   
 
 36  1
     public static String noMatchingConstructor(Class targetClass)
 37   
     {
 38  1
         return _formatter.format("no-matching-constructor", targetClass.getName());
 39   
     }
 40   
 
 41  0
     public static String invokeFailed(Constructor constructor, Throwable cause)
 42   
     {
 43  0
         return _formatter.format("invoke-failed", constructor.getDeclaringClass().getName(), cause);
 44   
     }
 45   
 
 46  1
     public static String noPropertyWriter(String propertyName, Object target)
 47   
     {
 48  1
         return _formatter.format("no-writer", propertyName, target);
 49   
     }
 50   
 
 51  2
     public static String writeFailure(String propertyName, Object target, Throwable cause)
 52   
     {
 53  2
         return _formatter.format("write-failure", new Object[] { propertyName, target, cause });
 54   
     }
 55   
 
 56  1
     public static String noReader(String propertyName, Object target)
 57   
     {
 58  1
         return _formatter.format("no-reader", propertyName, target);
 59   
     }
 60   
 
 61  1
     public static String readFailure(String propertyName, Object target, Throwable cause)
 62   
     {
 63  1
         return _formatter.format("read-failure", propertyName, target, cause);
 64   
     }
 65   
 
 66  1
     public static String nullObject()
 67   
     {
 68  1
         return _formatter.getMessage("null-object");
 69   
     }
 70   
 
 71  1
     public static String unableToIntrospect(Class targetClass, Throwable cause)
 72   
     {
 73  1
         return _formatter.format("unable-to-introspect", targetClass.getName(), cause);
 74   
     }
 75   
 
 76  0
     public static String badFileURL(String path, Throwable cause)
 77   
     {
 78  0
         return _formatter.format("bad-file-url", path, cause);
 79   
     }
 80   
 }
 81