1 15 package org.apache.hivemind.lib.factory; 16 17 import org.apache.hivemind.impl.MessageFormatter; 18 import org.apache.hivemind.service.ClassFabUtils; 19 20 class FactoryMessages 21 { 22 protected static MessageFormatter _formatter = new MessageFormatter(FactoryMessages.class); 23 24 public static String wrongContributionType(BeanFactoryContribution c, Class vendType) 25 { 26 return _formatter.format( 27 "wrong-contribution-type", 28 c.getName(), 29 c.getBeanClass().getName(), 30 vendType); 31 } 32 33 public static String invalidContributionClass(BeanFactoryContribution c) 34 { 35 return _formatter.format("invalid-contribution-class", c.getName(), ClassFabUtils 36 .getJavaClassName(c.getBeanClass())); 37 } 38 39 public static String unknownContribution(String name) 40 { 41 return _formatter.format("unknown-contribution", name); 42 } 43 44 public static String unableToInstantiate(Class objectClass, Throwable cause) 45 { 46 return _formatter.format("unable-to-instantiate", objectClass.getName(), cause); 47 } 48 49 public static String invalidBeanTranslatorFormat(String inputValue) 50 { 51 return _formatter.format("invalid-bean-translator-format", inputValue); 52 } 53 } | Popular Tags |