Clover coverage report - Code Coverage for hivemind-lib release 1.1-alpha-3
Coverage timestamp: Tue Mar 22 2005 09:11:37 EST
file stats: LOC: 118   Methods: 12
NCLOC: 82   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
ImplMessages.java - 66.7% 66.7% 66.7%
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.lib.impl;
 16   
 
 17   
 import javax.naming.Context;
 18   
 
 19   
 import org.apache.commons.logging.Log;
 20   
 import org.apache.commons.logging.LogFactory;
 21   
 import org.apache.hivemind.impl.MessageFormatter;
 22   
 import org.apache.hivemind.service.ClassFabUtils;
 23   
 
 24   
 /**
 25   
  * Messages for the lib.impl package.
 26   
  *
 27   
  * @author Howard Lewis Ship
 28   
  */
 29   
 final class ImplMessages
 30   
 {
 31   
     private static final Log LOG = LogFactory.getLog(ImplMessages.class);
 32   
 
 33   
     private static final MessageFormatter _formatter =
 34   
         new MessageFormatter(LOG, ImplMessages.class, "ImplStrings");
 35   
 
 36  0
     static String unableToCreateDefaultImplementation(Class interfaceType, Throwable cause)
 37   
     {
 38  0
         return _formatter.format(
 39   
             "unable-to-create-default-implementation",
 40   
             interfaceType.getName(),
 41   
             cause.getMessage());
 42   
     }
 43   
 
 44  1
     static String notAnInterface(Class interfaceType)
 45   
     {
 46  1
         return _formatter.format("not-an-interface", interfaceType.getName());
 47   
     }
 48   
 
 49  7
     static String defaultImplementationDescription(Class interfaceType)
 50   
     {
 51  7
         return _formatter.format("default-implementation-description", interfaceType.getName());
 52   
     }
 53   
 
 54  3
     static String ejbProxyDescription(String serviceId, Class serviceInterface, String jndiName)
 55   
     {
 56  3
         return _formatter.format(
 57   
             "ejb-proxy-description",
 58   
             serviceId,
 59   
             serviceInterface.getName(),
 60   
             jndiName);
 61   
     }
 62   
 
 63  1
     static String unableToLookup(String name, Context context)
 64   
     {
 65  1
         return _formatter.format("unable-to-lookup", name, context);
 66   
     }
 67   
 
 68  0
     static String noObject(String name, Class expectedType)
 69   
     {
 70  0
         return _formatter.format("no-object", name, expectedType);
 71   
     }
 72   
 
 73  0
     static String wrongType(String name, Object object, Class expectedType)
 74   
     {
 75  0
         return _formatter.format("wrong-type", name, object, expectedType);
 76   
     }
 77   
 
 78  0
     static String coordinatorLocked(String methodName)
 79   
     {
 80  0
         return _formatter.format("coordinator-locked", methodName);
 81   
     }
 82   
 
 83  1
     static String servicePropertyNotReadable(String propertyName, Object service)
 84   
     {
 85  1
         return _formatter.format("service-property-not-readable", propertyName, service);
 86   
     }
 87   
 
 88  1
     static String servicePropertyWrongType(
 89   
         String propertyName,
 90   
         Object service,
 91   
         Class actualType,
 92   
         Class expectedType)
 93   
     {
 94  1
         return _formatter.format(
 95   
             "service-property-wrong-type",
 96   
             new Object[] {
 97   
                 propertyName,
 98   
                 service,
 99   
                 ClassFabUtils.getJavaClassName(actualType),
 100   
                 expectedType.getName()});
 101   
     }
 102   
 
 103  6
     static String servicePropertyWasNull(String propertyName, Object service)
 104   
     {
 105  6
         return _formatter.format("service-property-was-null", propertyName, service);
 106   
     }
 107   
 
 108  6
     static String servicePropertyToString(
 109   
         String serviceId,
 110   
         Class serviceInterface,
 111   
         String propertyName,
 112   
         Object service)
 113   
     {
 114  6
         return _formatter.format(
 115   
             "service-property-to-string",
 116   
             new Object[] { serviceId, serviceInterface.getName(), propertyName, service });
 117   
     }
 118   
 }