Clover coverage report - Code Coverage for hivemind-lib release 1.0-beta-1
Coverage timestamp: Sat Jul 3 2004 09:42:02 EDT
file stats: LOC: 87   Methods: 8
NCLOC: 54   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 - 50% 50% 50%
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.lib.impl;
 16   
 
 17   
 import java.text.MessageFormat;
 18   
 import java.util.MissingResourceException;
 19   
 
 20   
 import javax.naming.Context;
 21   
 
 22   
 import org.apache.commons.logging.Log;
 23   
 import org.apache.commons.logging.LogFactory;
 24   
 import org.apache.hivemind.impl.MessageFormatter;
 25   
 
 26   
 /**
 27   
  * Messages for the lib.impl package.
 28   
  *
 29   
  * @author Howard Lewis Ship
 30   
  */
 31   
 final class ImplMessages
 32   
 {
 33   
     private static final Log LOG = LogFactory.getLog(ImplMessages.class);
 34   
 
 35   
     private static final MessageFormatter _formatter =
 36   
         new MessageFormatter(LOG, ImplMessages.class, "ImplStrings");
 37   
 
 38  0
     public static String unableToCreateDefaultImplementation(Class interfaceType, Throwable cause)
 39   
     {
 40  0
         return _formatter.format(
 41   
             "unable-to-create-default-implementation",
 42   
             interfaceType.getName(),
 43   
             cause.getMessage());
 44   
     }
 45   
 
 46  1
     public static String notAnInterface(Class interfaceType)
 47   
     {
 48  1
         return _formatter.format("not-an-interface", interfaceType.getName());
 49   
     }
 50   
 
 51  7
     public static String defaultImplementationDescription(Class interfaceType)
 52   
     {
 53  7
         return _formatter.format("default-implementation-description", interfaceType.getName());
 54   
     }
 55   
 
 56  3
     public static String ejbProxyDescription(
 57   
         String serviceId,
 58   
         Class serviceInterface,
 59   
         String jndiName)
 60   
     {
 61  3
         return _formatter.format(
 62   
             "ejb-proxy-description",
 63   
             serviceId,
 64   
             serviceInterface.getName(),
 65   
             jndiName);
 66   
     }
 67   
 
 68  1
     public static String unableToLookup(String name, Context context)
 69   
     {
 70  1
         return _formatter.format("unable-to-lookup", name, context);
 71   
     }
 72   
 
 73  0
     public static String noObject(String name, Class expectedType)
 74   
     {
 75  0
         return _formatter.format("no-object", name, expectedType);
 76   
     }
 77   
 
 78  0
     public static String wrongType(String name, Object object, Class expectedType)
 79   
     {
 80  0
         return _formatter.format("wrong-type", name, object, expectedType);
 81   
     }
 82   
 
 83  0
     public static String coordinatorLocked(String methodName)
 84   
     {
 85  0
         return _formatter.format("coordinator-locked", methodName);
 86   
     }
 87   
 }