Clover coverage report - Code Coverage for hivemind-lib release 1.0-rc-2
Coverage timestamp: Sat Sep 11 2004 09:10:14 EDT
file stats: LOC: 66   Methods: 6
NCLOC: 43   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
FactoryMessages.java - 100% 100% 100%
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.factory;
 16   
 
 17   
 import org.apache.hivemind.HiveMind;
 18   
 import org.apache.hivemind.impl.MessageFormatter;
 19   
 import org.apache.hivemind.service.ClassFabUtils;
 20   
 
 21   
 final class FactoryMessages
 22   
 {
 23   
     private static final MessageFormatter _formatter =
 24   
         new MessageFormatter(FactoryMessages.class, "FactoryStrings");
 25   
 
 26  1
     public static String wrongContributionType(BeanFactoryContribution c, Class vendType)
 27   
     {
 28  1
         return _formatter.format(
 29   
             "wrong-contribution-type",
 30   
             c.getName(),
 31   
             c.getBeanClass().getName(),
 32   
             vendType);
 33   
     }
 34   
 
 35  3
     public static String invalidContributionClass(BeanFactoryContribution c)
 36   
     {
 37  3
         return _formatter.format(
 38   
             "invalid-contribution-class",
 39   
             c.getName(),
 40   
             ClassFabUtils.getJavaClassName(c.getBeanClass()));
 41   
     }
 42   
 
 43  1
     public static String dupeContribution(BeanFactoryContribution existing)
 44   
     {
 45  1
         return _formatter.format(
 46   
             "dupe-contribution",
 47   
             existing.getName(),
 48   
             HiveMind.getLocationString(existing));
 49   
     }
 50   
 
 51  8
     public static String unknownContribution(String name)
 52   
     {
 53  8
         return _formatter.format("unknown-contribution", name);
 54   
     }
 55   
 
 56  1
     public static String unableToInstantiate(Class objectClass, Throwable cause)
 57   
     {
 58  1
         return _formatter.format("unable-to-instantiate", objectClass.getName(), cause);
 59   
     }
 60   
 
 61  2
     public static String invalidBeanTranslatorFormat(String inputValue)
 62   
     {
 63  2
         return _formatter.format("invalid-bean-translator-format", inputValue);
 64   
     }
 65   
 }
 66