2009/04/15 - Apache HiveMind has been retired.

For more information, please explore the Attic.

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