Clover coverage report - Code Coverage for hivemind release 1.0
Coverage timestamp: Wed Sep 22 2004 08:05:25 EDT
file stats: LOC: 199   Methods: 24
NCLOC: 151   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
ServiceMessages.java - 70.8% 70.8% 70.8%
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.service.impl;
 16   
 
 17   
 import java.beans.EventSetDescriptor;
 18   
 
 19   
 import javassist.CtClass;
 20   
 import javassist.CtMethod;
 21   
 
 22   
 import org.apache.hivemind.InterceptorStack;
 23   
 import org.apache.hivemind.Location;
 24   
 import org.apache.hivemind.impl.MessageFormatter;
 25   
 import org.apache.hivemind.service.MethodSignature;
 26   
 
 27   
 /**
 28   
  * Messages for the service.impl package.
 29   
  *
 30   
  * @author Howard Lewis Ship
 31   
  */
 32   
 final class ServiceMessages
 33   
 {
 34   
     private static final MessageFormatter _formatter =
 35   
         new MessageFormatter(ServiceMessages.class, "ServiceStrings");
 36   
 
 37  1
     public static String unableToInitializeService(
 38   
         String serviceId,
 39   
         String methodName,
 40   
         Class serviceClass,
 41   
         Throwable ex)
 42   
     {
 43  1
         return _formatter.format(
 44   
             "unable-to-initialize-service",
 45   
             new Object[] { serviceId, methodName, serviceClass.getName(), ex });
 46   
     }
 47   
 
 48  0
     public static String errorInstantiatingInterceptor(
 49   
         String serviceId,
 50   
         InterceptorStack stack,
 51   
         Class interceptorClass,
 52   
         Throwable cause)
 53   
     {
 54  0
         return _formatter.format(
 55   
             "error-instantiating-interceptor",
 56   
             new Object[] {
 57   
                 serviceId,
 58   
                 stack.getServiceInterface().getName(),
 59   
                 stack.getServiceExtensionPointId(),
 60   
                 interceptorClass.getName(),
 61   
                 cause });
 62   
     }
 63   
 
 64  0
     public static String unableToAddField(String fieldName, CtClass ctClass, Throwable cause)
 65   
     {
 66  0
         return _formatter.format("unable-to-add-field", fieldName, ctClass.getName(), cause);
 67   
     }
 68   
 
 69  1
     public static String unableToAddMethod(
 70   
         MethodSignature methodSignature,
 71   
         CtClass ctClass,
 72   
         Throwable cause)
 73   
     {
 74  1
         return _formatter.format("unable-to-add-method", methodSignature, ctClass.getName(), cause);
 75   
     }
 76   
 
 77  1
     public static String unableToAddConstructor(CtClass ctClass, Throwable cause)
 78   
     {
 79  1
         return _formatter.format("unable-to-add-constructor", ctClass.getName(), cause);
 80   
     }
 81   
 
 82  3
     public static String unableToWriteClass(CtClass ctClass, Throwable cause)
 83   
     {
 84  3
         return _formatter.format("unable-to-write-class", ctClass.getName(), cause);
 85   
     }
 86   
 
 87  0
     public static String unableToCreateClass(String name, Class superClass, Throwable cause)
 88   
     {
 89  0
         return _formatter.format("unable-to-create-class", name, superClass.getName(), cause);
 90   
     }
 91   
 
 92  0
     public static String unableToLookupClass(String name, Throwable cause)
 93   
     {
 94  0
         return _formatter.format("unable-to-lookup", name, cause);
 95   
     }
 96   
 
 97  1
     public static String duplicateSymbol(String symbol, Location priorLocation)
 98   
     {
 99  1
         return _formatter.format("duplicate-symbol", symbol, priorLocation);
 100   
     }
 101   
 
 102  1
     public static String notCompatibleWithEvent(
 103   
         Object consumer,
 104   
         EventSetDescriptor set,
 105   
         Object producer)
 106   
     {
 107  1
         return _formatter.format(
 108   
             "not-compatible-with-event",
 109   
             new Object[] { consumer, set.getListenerType().getName(), set.getName(), producer });
 110   
     }
 111   
 
 112  1
     public static String noSuchEventSet(Object producer, String name)
 113   
     {
 114  1
         return _formatter.format("no-such-event-set", producer, name);
 115   
     }
 116   
 
 117  2
     public static String noEventMatches(Object consumer, Object producer)
 118   
     {
 119  2
         return _formatter.format("no-event-matches", consumer, producer);
 120   
     }
 121   
 
 122  0
     public static String unableToAddListener(
 123   
         Object producer,
 124   
         EventSetDescriptor set,
 125   
         Object consumer,
 126   
         Location location,
 127   
         Throwable cause)
 128   
     {
 129  0
         return _formatter.format(
 130   
             "unable-to-add-listener",
 131   
             new Object[] { consumer, producer, set.getName(), location, cause });
 132   
     }
 133   
 
 134  0
     public static String unableToIntrospectClass(Class targetClass, Throwable cause)
 135   
     {
 136  0
         return _formatter.format("unable-to-introspect-class", targetClass.getName(), cause);
 137   
     }
 138   
 
 139  1
     public static String unableToAddCatch(Class exceptionClass, CtMethod method, Throwable cause)
 140   
     {
 141  1
         return _formatter.format(
 142   
             "unable-to-add-catch",
 143   
             exceptionClass.getName(),
 144   
             method.getDeclaringClass().getName(),
 145   
             cause);
 146   
     }
 147   
 
 148  1
     public static String duplicateMethodInClass(MethodSignature ms, ClassFabImpl cf)
 149   
     {
 150  1
         return _formatter.format("duplicate-method-in-class", ms, cf.getName());
 151   
     }
 152   
 
 153  1
     public static String unableToExtendMethod(
 154   
         MethodSignature ms,
 155   
         String className,
 156   
         Throwable cause)
 157   
     {
 158  1
         return _formatter.format("unable-to-extend-method", ms, className, cause);
 159   
     }
 160   
 
 161  1
     public static String invalidProviderSelector(String selector)
 162   
     {
 163  1
         return _formatter.format("invalid-provider-selector", selector);
 164   
     }
 165   
 
 166  1
     public static String unknownProviderPrefix(String prefix)
 167   
     {
 168  1
         return _formatter.format("unknown-provider-prefix", prefix);
 169   
     }
 170   
 
 171  1
     public static String duplicateProviderPrefix(String prefix, Location priorLocation)
 172   
     {
 173  1
         return _formatter.format("duplicate-provider-prefix", prefix, priorLocation);
 174   
     }
 175   
 
 176  1
     public static String errorInstantiatingInstance(Class clazz, Throwable cause)
 177   
     {
 178  1
         return _formatter.format("error-instantiating-instance", clazz.getName(), cause);
 179   
     }
 180   
 
 181  2
     public static String invalidServicePropertyLocator(String locator)
 182   
     {
 183  2
         return _formatter.format("invalid-service-property-locator", locator);
 184   
     }
 185   
 
 186  0
     public static String failureBuildingService(String serviceId, Throwable cause)
 187   
     {
 188  0
         return _formatter.format("failure-building-service", serviceId, cause);
 189   
     }
 190   
 
 191  1
     public static String autowirePropertyFailure(
 192   
         String propertyName,
 193   
         String serviceId,
 194   
         Throwable cause)
 195   
     {
 196  1
         return _formatter.format("autowire-property-failure", propertyName, serviceId, cause);
 197   
     }
 198   
 }
 199