You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemind.apache.org by hl...@apache.org on 2005/05/13 14:56:59 UTC
cvs commit: jakarta-hivemind/library/src/java/org/apache/hivemind/lib/pipeline PipelineMessages.java
hlship 2005/05/13 05:56:58
Modified: framework/src/java/org/apache/hivemind/servlet
ServletMessages.java
framework/src/java/org/apache/hivemind/impl/servicemodel
ServiceModelMessages.java
framework/src/java/org/apache/hivemind/internal/ser
SerMessages.java
library/src/java/org/apache/hivemind/lib/factory
FactoryMessages.java
framework/src/java/org/apache/hivemind/schema/rules
RulesMessages.java
library/src/java/org/apache/hivemind/lib/util
UtilMessages.java
framework/src/java/org/apache/hivemind/util
UtilMessages.java
jmx/src/java/org/apache/hivemind/management
ManagementMessages.java
library/src/java/org/apache/hivemind/lib/strategy
StrategyMessages.java
framework/src/java/org/apache/hivemind/order
OrdererMessages.java
framework/src/java/org/apache/hivemind HiveMindMessages.java
framework/src/test/hivemind/test/services
TestBuilderFactory.java
framework/src/java/org/apache/hivemind/impl
ImplMessages.java MessageFormatter.java
framework/src/java/org/apache/hivemind/service/impl
ServiceMessages.java
jmx/src/test/org/apache/hivemind/management
TestMBeanRegistry.java
framework/src/java/org/apache/hivemind/conditional
ConditionalMessages.java
framework/src/java/org/apache/hivemind/methodmatch
MethodMatchMessages.java
framework/src/java/org/apache/hivemind/parse
ParseMessages.java
library/src/java/org/apache/hivemind/lib/pipeline
PipelineMessages.java
Log:
Change the visibility of MessageFormatters inside the Messages classes, for eventual Spindle support.
Revision Changes Path
1.7 +6 -7 jakarta-hivemind/framework/src/java/org/apache/hivemind/servlet/ServletMessages.java
Index: ServletMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/servlet/ServletMessages.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ServletMessages.java 6 Jan 2005 01:45:16 -0000 1.6
+++ ServletMessages.java 13 May 2005 12:56:58 -0000 1.7
@@ -19,25 +19,24 @@
/**
* Messages for the servlet package.
- *
+ *
* @author Howard Lewis Ship
*/
-final class ServletMessages
+class ServletMessages
{
- private static final MessageFormatter _formatter =
- new MessageFormatter(ServletMessages.class, "ServletStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(ServletMessages.class);
- public static String filterCleanupError(Throwable cause)
+ static String filterCleanupError(Throwable cause)
{
return _formatter.format("filter-cleanup-error", cause);
}
- public static String filterInit()
+ static String filterInit()
{
return _formatter.getMessage("filter-init");
}
- public static String constructedRegistry(Registry registry, long millis)
+ static String constructedRegistry(Registry registry, long millis)
{
return _formatter.format("constructed-registry", registry, new Long(millis));
}
1.6 +11 -15 jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/ServiceModelMessages.java
Index: ServiceModelMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/servicemodel/ServiceModelMessages.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ServiceModelMessages.java 6 Jan 2005 01:45:10 -0000 1.5
+++ ServiceModelMessages.java 13 May 2005 12:56:58 -0000 1.6
@@ -19,37 +19,33 @@
/**
* Messages for the impl.servicemodel package.
- *
+ *
* @author Howard Lewis Ship
*/
-final class ServiceModelMessages
+class ServiceModelMessages
{
- private static final MessageFormatter _formatter =
- new MessageFormatter(ServiceModelMessages.class, "ServiceModelStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(ServiceModelMessages.class);
- public static String factoryReturnedNull(ServicePoint point)
+ static String factoryReturnedNull(ServicePoint point)
{
return _formatter.format("factory-returned-null", point.getExtensionPointId());
}
- public static String factoryWrongInterface(
- ServicePoint point,
- Object result,
- Class serviceType)
+ static String factoryWrongInterface(ServicePoint point, Object result, Class serviceType)
{
return _formatter.format(
- "factory-wrong-interface",
- point.getExtensionPointId(),
- result,
- serviceType.getName());
+ "factory-wrong-interface",
+ point.getExtensionPointId(),
+ result,
+ serviceType.getName());
}
- public static String registryCleanupIgnored(ServicePoint point)
+ static String registryCleanupIgnored(ServicePoint point)
{
return _formatter.format("registry-cleanup-ignored", point.getExtensionPointId());
}
- public static String unableToConstructService(ServicePoint point, Throwable cause)
+ static String unableToConstructService(ServicePoint point, Throwable cause)
{
return _formatter.format("unable-to-construct-service", point.getExtensionPointId(), cause);
}
1.4 +2 -3 jakarta-hivemind/framework/src/java/org/apache/hivemind/internal/ser/SerMessages.java
Index: SerMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/internal/ser/SerMessages.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SerMessages.java 31 Mar 2005 16:07:03 -0000 1.3
+++ SerMessages.java 13 May 2005 12:56:58 -0000 1.4
@@ -22,10 +22,9 @@
*/
class SerMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(SerMessages.class,
- "SerStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(SerMessages.class);
- public static String noSupportSet()
+ static String noSupportSet()
{
return _formatter.getMessage("no-support-set");
}
1.10 +2 -3 jakarta-hivemind/library/src/java/org/apache/hivemind/lib/factory/FactoryMessages.java
Index: FactoryMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/library/src/java/org/apache/hivemind/lib/factory/FactoryMessages.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- FactoryMessages.java 5 Jan 2005 18:05:45 -0000 1.9
+++ FactoryMessages.java 13 May 2005 12:56:58 -0000 1.10
@@ -17,10 +17,9 @@
import org.apache.hivemind.impl.MessageFormatter;
import org.apache.hivemind.service.ClassFabUtils;
-final class FactoryMessages
+class FactoryMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(FactoryMessages.class,
- "FactoryStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(FactoryMessages.class);
public static String wrongContributionType(BeanFactoryContribution c, Class vendType)
{
1.9 +39 -65 jakarta-hivemind/framework/src/java/org/apache/hivemind/schema/rules/RulesMessages.java
Index: RulesMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/schema/rules/RulesMessages.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- RulesMessages.java 19 Feb 2005 17:57:40 -0000 1.8
+++ RulesMessages.java 13 May 2005 12:56:58 -0000 1.9
@@ -23,154 +23,128 @@
/**
* Messages related to the rules package.
- *
+ *
* @author Howard Lewis Ship
*/
-final class RulesMessages
+class RulesMessages
{
- private static final MessageFormatter _formatter =
- new MessageFormatter(RulesMessages.class, "RulesStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(RulesMessages.class);
- public static String unableToSetElementProperty(
- String propertyName,
- Object target,
- SchemaProcessor processor,
- Element element,
- Throwable cause)
+ static String unableToSetElementProperty(String propertyName, Object target,
+ SchemaProcessor processor, Element element, Throwable cause)
{
- return _formatter.format(
- "unable-to-set-element-property",
- new Object[] {
- propertyName,
- target,
- processor.getElementPath(),
- HiveMind.getLocationString(element),
+ return _formatter.format("unable-to-set-element-property", new Object[]
+ { propertyName, target, processor.getElementPath(), HiveMind.getLocationString(element),
cause });
}
- public static String unableToSetProperty(String propertyName, Object target, Throwable cause)
+ static String unableToSetProperty(String propertyName, Object target, Throwable cause)
{
return _formatter.format("unable-to-set-property", propertyName, target, cause);
}
- public static String invalidBooleanValue(String inputValue)
+ static String invalidBooleanValue(String inputValue)
{
return _formatter.format("invalid-boolean-value", inputValue);
}
- public static String invalidDoubleValue(String inputValue)
+ static String invalidDoubleValue(String inputValue)
{
return _formatter.format("invalid-double-value", inputValue);
}
- public static String minDoubleValue(String inputValue, double minValue)
+ static String minDoubleValue(String inputValue, double minValue)
{
return _formatter.format("min-double-value", inputValue, new Double(minValue));
}
- public static String maxDoubleValue(String inputValue, double maxValue)
+ static String maxDoubleValue(String inputValue, double maxValue)
{
return _formatter.format("max-double-value", inputValue, new Double(maxValue));
}
- public static String enumNotRecognized(String inputValue)
+ static String enumNotRecognized(String inputValue)
{
return _formatter.format("enum-not-recognized", inputValue);
}
- public static String enumError(Class enumClass, String fieldName, Throwable cause)
+ static String enumError(Class enumClass, String fieldName, Throwable cause)
{
return _formatter.format("enum-error", enumClass.getName(), fieldName, cause);
}
- public static String invalidIntValue(String inputValue)
+ static String invalidIntValue(String inputValue)
{
return _formatter.format("invalid-int-value", inputValue);
}
- public static String minIntValue(String inputValue, int minValue)
+ static String minIntValue(String inputValue, int minValue)
{
return _formatter.format("min-int-value", inputValue, new Integer(minValue));
}
- public static String maxIntValue(String inputValue, int maxValue)
+ static String maxIntValue(String inputValue, int maxValue)
{
return _formatter.format("max-int-value", inputValue, new Integer(maxValue));
}
- public static String errorInvokingMethod(
- String methodName,
- Object parent,
- Location location,
- Throwable cause)
+ static String errorInvokingMethod(String methodName, Object parent, Location location,
+ Throwable cause)
{
- return _formatter.format(
- "error-invoking-method",
- new Object[] { methodName, parent, location, cause });
+ return _formatter.format("error-invoking-method", new Object[]
+ { methodName, parent, location, cause });
}
- public static String invalidLongValue(String inputValue)
+ static String invalidLongValue(String inputValue)
{
return _formatter.format("invalid-long-value", inputValue);
}
- public static String minLongValue(String inputValue, long minValue)
+ static String minLongValue(String inputValue, long minValue)
{
return _formatter.format("min-long-value", inputValue, new Long(minValue));
}
- public static String maxLongValue(String inputValue, long maxValue)
+ static String maxLongValue(String inputValue, long maxValue)
{
return _formatter.format("max-long-value", inputValue, new Long(maxValue));
}
- public static String readAttributeFailure(
- String attributeName,
- Element element,
- SchemaProcessor processor,
- Throwable cause)
+ static String readAttributeFailure(String attributeName, Element element,
+ SchemaProcessor processor, Throwable cause)
{
- return _formatter.format(
- "read-attribute-failure",
- new Object[] { attributeName, processor.getElementPath(), cause });
+ return _formatter.format("read-attribute-failure", new Object[]
+ { attributeName, processor.getElementPath(), cause });
}
- public static String readContentFailure(
- SchemaProcessor processor,
- Element element,
- Throwable cause)
+ static String readContentFailure(SchemaProcessor processor, Element element, Throwable cause)
{
return _formatter.format("read-content-failure", processor.getElementPath(), cause);
}
- public static String resourceLocalizationError(String inputValue, Module contributingModule)
+ static String resourceLocalizationError(String inputValue, Module contributingModule)
{
- return _formatter.format(
- "resource-localization-error",
- inputValue,
- contributingModule.getModuleId());
+ return _formatter.format("resource-localization-error", inputValue, contributingModule
+ .getModuleId());
}
- public static String invalidInitializer(String initializer)
+ static String invalidInitializer(String initializer)
{
return _formatter.format("invalid-initializer", initializer);
}
- public static String noPropertyEditor(Class propertyType)
+ static String noPropertyEditor(Class propertyType)
{
return _formatter.format("no-property-editor", propertyType.getName());
}
- public static String smartTranslatorError(
- String inputValue,
- Class propertyType,
- Throwable cause)
+ static String smartTranslatorError(String inputValue, Class propertyType, Throwable cause)
{
return _formatter.format(
- "smart-translator-error",
- inputValue,
- propertyType.getName(),
- cause);
+ "smart-translator-error",
+ inputValue,
+ propertyType.getName(),
+ cause);
}
}
\ No newline at end of file
1.5 +5 -5 jakarta-hivemind/library/src/java/org/apache/hivemind/lib/util/UtilMessages.java
Index: UtilMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/library/src/java/org/apache/hivemind/lib/util/UtilMessages.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- UtilMessages.java 30 Mar 2005 15:19:32 -0000 1.4
+++ UtilMessages.java 13 May 2005 12:56:58 -0000 1.5
@@ -23,17 +23,17 @@
*/
class UtilMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(UtilMessages.class,
- "UtilStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(UtilMessages.class);
- public static String duplicateRegistration(Class subjectClass)
+ static String duplicateRegistration(Class subjectClass)
{
return _formatter.format("duplicate-registration", ClassFabUtils
.getJavaClassName(subjectClass));
}
- public static String strategyNotFound(Class subjectClass)
+ static String strategyNotFound(Class subjectClass)
{
- return _formatter.format("strategy-not-found", ClassFabUtils.getJavaClassName(subjectClass));
+ return _formatter
+ .format("strategy-not-found", ClassFabUtils.getJavaClassName(subjectClass));
}
}
\ No newline at end of file
1.12 +16 -17 jakarta-hivemind/framework/src/java/org/apache/hivemind/util/UtilMessages.java
Index: UtilMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/util/UtilMessages.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- UtilMessages.java 19 Feb 2005 17:57:40 -0000 1.11
+++ UtilMessages.java 13 May 2005 12:56:58 -0000 1.12
@@ -24,75 +24,74 @@
*
* @author Howard Lewis Ship
*/
-final class UtilMessages
+class UtilMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(UtilMessages.class,
- "UtilStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(UtilMessages.class);
- public static String noSuchProperty(Object target, String propertyName)
+ static String noSuchProperty(Object target, String propertyName)
{
return _formatter.format("no-such-property", target.getClass().getName(), propertyName);
}
- public static String noMatchingConstructor(Class targetClass)
+ static String noMatchingConstructor(Class targetClass)
{
return _formatter.format("no-matching-constructor", targetClass.getName());
}
- public static String invokeFailed(Constructor constructor, Throwable cause)
+ static String invokeFailed(Constructor constructor, Throwable cause)
{
return _formatter.format("invoke-failed", constructor.getDeclaringClass().getName(), cause);
}
- public static String noPropertyWriter(String propertyName, Object target)
+ static String noPropertyWriter(String propertyName, Object target)
{
return _formatter.format("no-writer", propertyName, target);
}
- public static String writeFailure(String propertyName, Object target, Throwable cause)
+ static String writeFailure(String propertyName, Object target, Throwable cause)
{
return _formatter.format("write-failure", new Object[]
{ propertyName, target, cause });
}
- public static String noReader(String propertyName, Object target)
+ static String noReader(String propertyName, Object target)
{
return _formatter.format("no-reader", propertyName, target);
}
- public static String readFailure(String propertyName, Object target, Throwable cause)
+ static String readFailure(String propertyName, Object target, Throwable cause)
{
return _formatter.format("read-failure", propertyName, target, cause);
}
- public static String nullObject()
+ static String nullObject()
{
return _formatter.getMessage("null-object");
}
- public static String unableToIntrospect(Class targetClass, Throwable cause)
+ static String unableToIntrospect(Class targetClass, Throwable cause)
{
return _formatter.format("unable-to-introspect", targetClass.getName(), cause);
}
- public static String badFileURL(String path, Throwable cause)
+ static String badFileURL(String path, Throwable cause)
{
return _formatter.format("bad-file-url", path, cause);
}
- public static String unableToReferenceContextPath(String path, MalformedURLException ex)
+ static String unableToReferenceContextPath(String path, MalformedURLException ex)
{
return _formatter.format("unable-to-reference-context-path", path, ex);
}
/** @since 1.1 */
- public static String noPropertyEditor(String propertyName, Class targetClass)
+ static String noPropertyEditor(String propertyName, Class targetClass)
{
return _formatter.format("no-property-editor", propertyName, targetClass.getName());
}
/** @since 1.1 */
- public static String unableToConvert(String value, Class propertyType,
+ static String unableToConvert(String value, Class propertyType,
String propertyName, Object target, Throwable cause)
{
@@ -101,7 +100,7 @@
}
/** @since 1.1 */
- public static String unableToInstantiateInstanceOfClass(Class clazz, Throwable cause)
+ static String unableToInstantiateInstanceOfClass(Class clazz, Throwable cause)
{
return _formatter.format("unable-to-instantiate-instance-of-class", clazz.getName(), cause);
}
1.2 +2 -3 jakarta-hivemind/jmx/src/java/org/apache/hivemind/management/ManagementMessages.java
Index: ManagementMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/jmx/src/java/org/apache/hivemind/management/ManagementMessages.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ManagementMessages.java 16 Apr 2005 14:41:38 -0000 1.1
+++ ManagementMessages.java 13 May 2005 12:56:58 -0000 1.2
@@ -28,10 +28,9 @@
* @author Achim Huegen
* @since 1.1
*/
-public final class ManagementMessages
+public class ManagementMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(
- ManagementMessages.class, "ManagementStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(ManagementMessages.class);
public static String errorInstantiatingPerformanceInterceptor(String serviceId,
InterceptorStack stack, Throwable cause)
1.2 +3 -5 jakarta-hivemind/library/src/java/org/apache/hivemind/lib/strategy/StrategyMessages.java
Index: StrategyMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/library/src/java/org/apache/hivemind/lib/strategy/StrategyMessages.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StrategyMessages.java 30 Mar 2005 15:19:32 -0000 1.1
+++ StrategyMessages.java 13 May 2005 12:56:58 -0000 1.2
@@ -22,13 +22,11 @@
* @author Howard M. Lewis Ship
* @since 1.1
*/
-public class StrategyMessages
+class StrategyMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(StrategyMessages.class,
- "StrategyStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(StrategyMessages.class);
- static String strategyWrongInterface(Object adaptor, Class registerClass,
- Class serviceInterface)
+ static String strategyWrongInterface(Object adaptor, Class registerClass, Class serviceInterface)
{
return _formatter.format("strategy-wrong-interface", adaptor, ClassFabUtils
.getJavaClassName(registerClass), serviceInterface.getName());
1.9 +22 -44 jakarta-hivemind/framework/src/java/org/apache/hivemind/order/OrdererMessages.java
Index: OrdererMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/order/OrdererMessages.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- OrdererMessages.java 4 May 2005 03:24:12 -0000 1.8
+++ OrdererMessages.java 13 May 2005 12:56:58 -0000 1.9
@@ -20,72 +20,50 @@
/**
* Messages for classes in this package.
- *
+ *
* @author Howard Lewis Ship
*/
-final class OrdererMessages
+class OrdererMessages
{
- private static final MessageFormatter _formatter =
- new MessageFormatter(OrdererMessages.class, "OrdererStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(OrdererMessages.class);
- public static String duplicateName(
- String objectType,
- String objectName,
- Object newObject,
- Object existingObject)
+ static String duplicateName(String objectType, String objectName, Object newObject,
+ Object existingObject)
{
return _formatter.format(
- "duplicate-name",
- StringUtils.capitalize(objectType),
- objectName,
- HiveMind.getLocationString(existingObject));
+ "duplicate-name",
+ StringUtils.capitalize(objectType),
+ objectName,
+ HiveMind.getLocationString(existingObject));
}
- public static String exception(String objectType, Throwable cause)
+ static String exception(String objectType, Throwable cause)
{
return _formatter.format("exception", objectType, cause);
}
- public static String dupeLeader(
- String objectType,
- ObjectOrdering newOrdering,
- ObjectOrdering existingLeader)
+ static String dupeLeader(String objectType, ObjectOrdering newOrdering,
+ ObjectOrdering existingLeader)
{
- return _formatter.format(
- "dupe-leader",
- new Object[] {
- StringUtils.capitalize(objectType),
- newOrdering.getName(),
- existingLeader.getName(),
- HiveMind.getLocationString(existingLeader.getObject())});
+ return _formatter.format("dupe-leader", new Object[]
+ { StringUtils.capitalize(objectType), newOrdering.getName(), existingLeader.getName(),
+ HiveMind.getLocationString(existingLeader.getObject()) });
}
- public static String dupeTrailer(
- String objectType,
- ObjectOrdering newOrdering,
- ObjectOrdering existingTrailer)
+ static String dupeTrailer(String objectType, ObjectOrdering newOrdering,
+ ObjectOrdering existingTrailer)
{
- return _formatter.format(
- "dupe-trailer",
- new Object[] {
- StringUtils.capitalize(objectType),
- newOrdering.getName(),
- existingTrailer.getName(),
- HiveMind.getLocationString(existingTrailer.getObject())});
+ return _formatter.format("dupe-trailer", new Object[]
+ { StringUtils.capitalize(objectType), newOrdering.getName(), existingTrailer.getName(),
+ HiveMind.getLocationString(existingTrailer.getObject()) });
}
- public static String dependencyCycle(
- String objectType,
- ObjectOrdering trigger,
- Throwable cause)
+ static String dependencyCycle(String objectType, ObjectOrdering trigger, Throwable cause)
{
return _formatter.format("dependency-cycle", objectType, trigger.getName(), cause);
}
- public static String badDependency(
- String objectType,
- String dependencyName,
- ObjectOrdering ordering)
+ static String badDependency(String objectType, String dependencyName, ObjectOrdering ordering)
{
return _formatter.format("bad-dependency", objectType, dependencyName, ordering.getName());
1.7 +2 -3 jakarta-hivemind/framework/src/java/org/apache/hivemind/HiveMindMessages.java
Index: HiveMindMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/HiveMindMessages.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HiveMindMessages.java 5 Jan 2005 18:05:19 -0000 1.6
+++ HiveMindMessages.java 13 May 2005 12:56:58 -0000 1.7
@@ -22,10 +22,9 @@
*
* @author Howard Lewis Ship
*/
-public final class HiveMindMessages
+public class HiveMindMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(HiveMindMessages.class,
- "HiveMindStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(HiveMindMessages.class);
public static String unimplementedMethod(Object instance, String methodName)
{
1.28 +9 -13 jakarta-hivemind/framework/src/test/hivemind/test/services/TestBuilderFactory.java
Index: TestBuilderFactory.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/services/TestBuilderFactory.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- TestBuilderFactory.java 29 Apr 2005 07:40:56 -0000 1.27
+++ TestBuilderFactory.java 13 May 2005 12:56:58 -0000 1.28
@@ -393,10 +393,10 @@
StringHolder h = new StringHolderImpl();
- module.containsService( String.class );
- mc.setReturnValue( false );
- module.containsService( StringHolder.class );
- mc.setReturnValue( true );
+ module.containsService(String.class);
+ mc.setReturnValue(false);
+ module.containsService(StringHolder.class);
+ mc.setReturnValue(true);
module.getService(StringHolder.class);
mc.setReturnValue(h);
@@ -426,9 +426,6 @@
MockControl mc = newControl(Module.class);
Module module = (Module) mc.getMock();
- MockControl ehc = newControl(ErrorHandler.class);
- ErrorHandler eh = (ErrorHandler) ehc.getMock();
-
Log log = (Log) newMock(Log.class);
fp.getLog();
@@ -443,12 +440,11 @@
module.resolveType("hivemind.test.services.ServiceAutowireTarget");
mc.setReturnValue(ServiceAutowireTarget.class);
- module.containsService( String.class );
- mc.setReturnValue( false );
- module.containsService( StringHolder.class );
- mc.setReturnValue( false );
-
-
+ module.containsService(String.class);
+ mc.setReturnValue(false);
+ module.containsService(StringHolder.class);
+ mc.setReturnValue(false);
+
replayControls();
BuilderParameter parameter = new BuilderParameter();
1.28 +56 -56 jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/ImplMessages.java
Index: ImplMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/ImplMessages.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ImplMessages.java 27 Apr 2005 14:19:46 -0000 1.27
+++ ImplMessages.java 13 May 2005 12:56:58 -0000 1.28
@@ -39,44 +39,44 @@
*
* @author Howard Lewis Ship
*/
-final class ImplMessages
+class ImplMessages
{
private static final MessageFormatter _formatter = new MessageFormatter(ImplMessages.class,
"ImplStrings");
- public static String recursiveServiceBuild(ServicePoint point)
+ static String recursiveServiceBuild(ServicePoint point)
{
return _formatter.format("recursive-service-build", point.getExtensionPointId());
}
- public static String recursiveConfiguration(String pointId)
+ static String recursiveConfiguration(String pointId)
{
return _formatter.format("recursive-configuration", pointId);
}
- public static String unableToConstructConfiguration(String pointId, Throwable exception)
+ static String unableToConstructConfiguration(String pointId, Throwable exception)
{
return _formatter.format("unable-to-construct-configuration", pointId, exception
.getMessage());
}
- public static String unknownServiceModel(String name)
+ static String unknownServiceModel(String name)
{
return _formatter.format("unknown-service-model", name);
}
- public static String unknownTranslatorName(String name, String configurationId)
+ static String unknownTranslatorName(String name, String configurationId)
{
return _formatter.format("unknown-translator-name", name, configurationId);
}
- public static String duplicateTranslatorName(String name, Location oldLocation)
+ static String duplicateTranslatorName(String name, Location oldLocation)
{
return _formatter.format("duplicate-translator-name", name, HiveMind
.getLocationString(oldLocation));
}
- public static String translatorInstantiationFailure(Class translatorClass, Throwable cause)
+ static String translatorInstantiationFailure(Class translatorClass, Throwable cause)
{
return _formatter.format(
"translator-instantiation-failure",
@@ -84,29 +84,29 @@
cause);
}
- public static String unqualifiedServicePoint( String serviceId, String matchingIds )
+ static String unqualifiedServicePoint( String serviceId, String matchingIds )
{
return _formatter.format( "unqualified-service-point", serviceId, matchingIds );
}
- public static String noSuchServicePoint(String serviceId)
+ static String noSuchServicePoint(String serviceId)
{
return _formatter.format("no-such-service-point", serviceId);
}
- public static String unableToLoadClass(String name, ClassLoader loader, Throwable cause)
+ static String unableToLoadClass(String name, ClassLoader loader, Throwable cause)
{
return _formatter.format("unable-to-load-class", name, loader, cause);
}
- public static String nullInterceptor(ServiceInterceptorContribution contribution,
+ static String nullInterceptor(ServiceInterceptorContribution contribution,
ServicePoint point)
{
return _formatter.format("null-interceptor", contribution.getFactoryServiceId(), point
.getExtensionPointId());
}
- public static String interceptorDoesNotImplementInterface(Object interceptor,
+ static String interceptorDoesNotImplementInterface(Object interceptor,
ServiceInterceptorContribution contribution, ServicePoint point, Class serviceInterface)
{
return _formatter.format("interceptor-does-not-implement-interface", new Object[]
@@ -114,22 +114,22 @@
serviceInterface.getName() });
}
- public static String unableToReadMessages(URL url)
+ static String unableToReadMessages(URL url)
{
return _formatter.format("unable-to-read-messages", url);
}
- public static String unableToParse(Resource resource, Throwable cause)
+ static String unableToParse(Resource resource, Throwable cause)
{
return _formatter.format("unable-to-parse", resource, cause);
}
- public static String unableToFindModules(ClassResolver resolver, Throwable cause)
+ static String unableToFindModules(ClassResolver resolver, Throwable cause)
{
return _formatter.format("unable-to-find-modules", resolver, cause);
}
- public static String duplicateModuleId(String moduleId, Location locationOfExisting,
+ static String duplicateModuleId(String moduleId, Location locationOfExisting,
Location locationOfDuplicate)
{
return _formatter.format(
@@ -139,19 +139,19 @@
locationOfDuplicate.getResource());
}
- public static String duplicateExtensionPointId(String pointId, ExtensionPoint existingPoint)
+ static String duplicateExtensionPointId(String pointId, ExtensionPoint existingPoint)
{
return _formatter.format("duplicate-extension-point", pointId, existingPoint.getLocation());
}
- public static String unknownConfigurationPoint(String moduleId,
+ static String unknownConfigurationPoint(String moduleId,
ContributionDescriptor descriptor)
{
return _formatter.format("unknown-configuration-extension-point", moduleId, descriptor
.getConfigurationId());
}
- public static String unknownServicePoint(Module sourceModule, String pointId)
+ static String unknownServicePoint(Module sourceModule, String pointId)
{
return _formatter.format(
"unknown-service-extension-point",
@@ -159,19 +159,19 @@
pointId);
}
- public static String missingService(ServicePoint point)
+ static String missingService(ServicePoint point)
{
return _formatter.format("missing-service", point.getExtensionPointId());
}
- public static String duplicateFactory(Module sourceModule, String pointId,
+ static String duplicateFactory(Module sourceModule, String pointId,
ServicePointImpl existing)
{
return _formatter.format("duplicate-factory", sourceModule.getModuleId(), pointId, existing
.getServiceConstructor().getContributingModule().getModuleId());
}
- public static String wrongNumberOfContributions(ConfigurationPoint point, int actualCount,
+ static String wrongNumberOfContributions(ConfigurationPoint point, int actualCount,
Occurances expectation)
{
return _formatter.format(
@@ -181,17 +181,17 @@
occurances(expectation));
}
- public static String occurances(Occurances occurances)
+ static String occurances(Occurances occurances)
{
return _formatter.getMessage("occurances." + occurances.getName());
}
- public static String contributionCount(int count)
+ static String contributionCount(int count)
{
return _formatter.format("contribution-count", new Integer(count));
}
- public static String wrongNumberOfParameters(String factoryServiceId, int actualCount,
+ static String wrongNumberOfParameters(String factoryServiceId, int actualCount,
Occurances expectation)
{
return _formatter.format(
@@ -202,54 +202,54 @@
}
- public static String noSuchConfiguration(String pointId)
+ static String noSuchConfiguration(String pointId)
{
return _formatter.format("no-such-configuration", pointId);
}
- public static String noSuchSymbol(String name)
+ static String noSuchSymbol(String name)
{
return _formatter.format("no-such-symbol", name);
}
- public static String symbolSourceContribution()
+ static String symbolSourceContribution()
{
return _formatter.getMessage("symbol-source-contribution");
}
- public static String unknownAttribute(String name)
+ static String unknownAttribute(String name)
{
return _formatter.format("unknown-attribute", name);
}
- public static String missingAttribute(String name)
+ static String missingAttribute(String name)
{
return _formatter.format("missing-attribute", name);
}
- public static String uniqueAttributeConstraintBroken(String name, String value,
+ static String uniqueAttributeConstraintBroken(String name, String value,
Location priorLocation)
{
return _formatter.format("unique-attribute-constraint-broken", name, value, priorLocation);
}
- public static String elementErrors(SchemaProcessor processor, Element element)
+ static String elementErrors(SchemaProcessor processor, Element element)
{
return _formatter.format("element-errors", processor.getElementPath(), element
.getLocation());
}
- public static String unknownElement(SchemaProcessor processor, Element element)
+ static String unknownElement(SchemaProcessor processor, Element element)
{
return _formatter.format("unknown-element", processor.getElementPath());
}
- public static String badInterface(String interfaceName, String pointId)
+ static String badInterface(String interfaceName, String pointId)
{
return _formatter.format("bad-interface", interfaceName, pointId);
}
- public static String serviceWrongInterface(ServicePoint servicePoint, Class requestedInterface)
+ static String serviceWrongInterface(ServicePoint servicePoint, Class requestedInterface)
{
return _formatter.format(
"service-wrong-interface",
@@ -258,38 +258,38 @@
servicePoint.getServiceInterface().getName());
}
- public static String shutdownCoordinatorFailure(RegistryShutdownListener listener,
+ static String shutdownCoordinatorFailure(RegistryShutdownListener listener,
Throwable cause)
{
return _formatter.format("shutdown-coordinator-failure", listener, cause);
}
- public static String unlocatedError(String message)
+ static String unlocatedError(String message)
{
return _formatter.format("unlocated-error", message);
}
- public static String locatedError(Location location, String message)
+ static String locatedError(Location location, String message)
{
return _formatter.format("located-error", location, message);
}
- public static String interceptorContribution()
+ static String interceptorContribution()
{
return _formatter.getMessage("interceptor-contribution");
}
- public static String registryAlreadyStarted()
+ static String registryAlreadyStarted()
{
return _formatter.getMessage("registry-already-started");
}
- public static String noServicePointForInterface(Class interfaceClass)
+ static String noServicePointForInterface(Class interfaceClass)
{
return _formatter.format("no-service-point-for-interface", interfaceClass.getName());
}
- public static String multipleServicePointsForInterface(Class interfaceClass,
+ static String multipleServicePointsForInterface(Class interfaceClass,
Collection matchingPoints)
{
StringBuffer buffer = new StringBuffer("{");
@@ -317,27 +317,27 @@
buffer);
}
- public static String incompleteTranslator(TranslatorContribution c)
+ static String incompleteTranslator(TranslatorContribution c)
{
return _formatter.format("incomplete-translator", c.getName());
}
- public static String schemaStackViolation(SchemaProcessor processor)
+ static String schemaStackViolation(SchemaProcessor processor)
{
return _formatter.format("schema-stack-violation", processor.getElementPath());
}
- public static String subModuleDoesNotExist(Resource subModuleDescriptor)
+ static String subModuleDoesNotExist(Resource subModuleDescriptor)
{
return _formatter.format("sub-module-does-not-exist", subModuleDescriptor);
}
- public static String dependencyOnUnknownModule(DependencyDescriptor dependency)
+ static String dependencyOnUnknownModule(DependencyDescriptor dependency)
{
return _formatter.format("dependency-on-unknown-module", dependency.getModuleId());
}
- public static String dependencyVersionMismatch(DependencyDescriptor dependency)
+ static String dependencyVersionMismatch(DependencyDescriptor dependency)
{
return _formatter.format(
"dependency-version-mismatch",
@@ -353,22 +353,22 @@
return _formatter.format("module", module.getModuleId());
}
- public static String unableToResolveSchema(String schemaId)
+ static String unableToResolveSchema(String schemaId)
{
return _formatter.format("unable-to-resolve-schema", schemaId);
}
- public static String schemaNotVisible(String schemaId, String moduleId)
+ static String schemaNotVisible(String schemaId, String moduleId)
{
return _formatter.format("schema-not-visible", schemaId, moduleId);
}
- public static String serviceNotVisible(String serviceId, Module module)
+ static String serviceNotVisible(String serviceId, Module module)
{
return _formatter.format("service-not-visible", serviceId, convertModule(module));
}
- public static String configurationNotVisible(String configurationId, Module module)
+ static String configurationNotVisible(String configurationId, Module module)
{
return _formatter.format(
"configuration-not-visible",
@@ -376,7 +376,7 @@
convertModule(module));
}
- public static String configurationPointNotVisible(ConfigurationPoint point,
+ static String configurationPointNotVisible(ConfigurationPoint point,
Module contributingModule)
{
return _formatter.format(
@@ -385,7 +385,7 @@
contributingModule.getModuleId());
}
- public static String servicePointNotVisible(ServicePoint point, Module contributingModule)
+ static String servicePointNotVisible(ServicePoint point, Module contributingModule)
{
return _formatter.format(
"service-point-not-visible",
@@ -393,12 +393,12 @@
contributingModule.getModuleId());
}
- public static String unableToMapConfiguration(ConfigurationPoint point)
+ static String unableToMapConfiguration(ConfigurationPoint point)
{
return _formatter.format("unable-to-map-configuration", point.getExtensionPointId());
}
- public static String unableToConvertType(String type, String packageName)
+ static String unableToConvertType(String type, String packageName)
{
return _formatter.format("unable-to-convert-type", type, packageName);
}
1.11 +33 -7 jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/MessageFormatter.java
Index: MessageFormatter.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/impl/MessageFormatter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- MessageFormatter.java 4 May 2005 13:19:08 -0000 1.10
+++ MessageFormatter.java 13 May 2005 12:56:58 -0000 1.11
@@ -39,6 +39,17 @@
_bundle = bundle;
}
+ /**
+ * Assumes that the bundle name is the same as the reference class, with "Messages" stripped
+ * off, and "Strings" appended.
+ *
+ * @since 1.1
+ */
+ public MessageFormatter(Class referenceClass)
+ {
+ this(referenceClass, getStringsName(referenceClass));
+ }
+
public MessageFormatter(Class referenceClass, String name)
{
this(LogFactory.getLog(referenceClass), referenceClass, name);
@@ -46,7 +57,7 @@
public MessageFormatter(Log log, Class referenceClass, String name)
{
- this(log, getResourceBundleName( referenceClass, name ) );
+ this(log, getResourceBundleName(referenceClass, name));
}
public MessageFormatter(Log log, String bundleName)
@@ -71,20 +82,35 @@
{
return Locale.getDefault();
}
-
- private static String getResourceBundleName( Class referenceClass, String name )
+
+ private static String getStringsName(Class referenceClass)
+ {
+ String className = referenceClass.getName();
+
+ int lastDotIndex = className.lastIndexOf('.');
+
+ String justClass = className.substring(lastDotIndex + 1);
+
+ int mpos = justClass.indexOf("Messages");
+
+ return justClass.substring(0, mpos) + "Strings";
+ }
+
+ private static String getResourceBundleName(Class referenceClass, String name)
{
String packageName = null;
- if( referenceClass.getPackage() != null )
+ if (referenceClass.getPackage() != null)
{
packageName = referenceClass.getPackage().getName();
}
else
{
- final int lastDotIndex = referenceClass.getName().lastIndexOf( '.' );
- packageName = ( lastDotIndex == -1 ? "" : referenceClass.getName().substring( 0, lastDotIndex ) );
+ final int lastDotIndex = referenceClass.getName().lastIndexOf('.');
+ packageName = (lastDotIndex == -1 ? "" : referenceClass.getName().substring(
+ 0,
+ lastDotIndex));
}
- return packageName.equals( "" ) ? name : packageName + "." + name;
+ return packageName.equals("") ? name : packageName + "." + name;
}
}
\ No newline at end of file
1.19 +27 -30 jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java
Index: ServiceMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/service/impl/ServiceMessages.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ServiceMessages.java 19 Feb 2005 17:57:40 -0000 1.18
+++ ServiceMessages.java 13 May 2005 12:56:58 -0000 1.19
@@ -29,19 +29,18 @@
*
* @author Howard Lewis Ship
*/
-final class ServiceMessages
+class ServiceMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(ServiceMessages.class,
- "ServiceStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(ServiceMessages.class);
- public static String unableToInitializeService(String serviceId, String methodName,
+ static String unableToInitializeService(String serviceId, String methodName,
Class serviceClass, Throwable ex)
{
return _formatter.format("unable-to-initialize-service", new Object[]
{ serviceId, methodName, serviceClass.getName(), ex });
}
- public static String errorInstantiatingInterceptor(String serviceId, InterceptorStack stack,
+ static String errorInstantiatingInterceptor(String serviceId, InterceptorStack stack,
Class interceptorClass, Throwable cause)
{
return _formatter.format("error-instantiating-interceptor", new Object[]
@@ -49,120 +48,118 @@
interceptorClass.getName(), cause });
}
- public static String unableToAddField(String fieldName, CtClass ctClass, Throwable cause)
+ static String unableToAddField(String fieldName, CtClass ctClass, Throwable cause)
{
return _formatter.format("unable-to-add-field", fieldName, ctClass.getName(), cause);
}
- public static String unableToAddMethod(MethodSignature methodSignature, CtClass ctClass,
+ static String unableToAddMethod(MethodSignature methodSignature, CtClass ctClass,
Throwable cause)
{
return _formatter.format("unable-to-add-method", methodSignature, ctClass.getName(), cause);
}
- public static String unableToAddConstructor(CtClass ctClass, Throwable cause)
+ static String unableToAddConstructor(CtClass ctClass, Throwable cause)
{
return _formatter.format("unable-to-add-constructor", ctClass.getName(), cause);
}
- public static String unableToWriteClass(CtClass ctClass, Throwable cause)
+ static String unableToWriteClass(CtClass ctClass, Throwable cause)
{
return _formatter.format("unable-to-write-class", ctClass.getName(), cause);
}
- public static String unableToCreateClass(String name, Class superClass, Throwable cause)
+ static String unableToCreateClass(String name, Class superClass, Throwable cause)
{
return _formatter.format("unable-to-create-class", name, superClass.getName(), cause);
}
- public static String unableToLookupClass(String name, Throwable cause)
+ static String unableToLookupClass(String name, Throwable cause)
{
return _formatter.format("unable-to-lookup", name, cause);
}
- public static String notCompatibleWithEvent(Object consumer, EventSetDescriptor set,
- Object producer)
+ static String notCompatibleWithEvent(Object consumer, EventSetDescriptor set, Object producer)
{
return _formatter.format("not-compatible-with-event", new Object[]
{ consumer, set.getListenerType().getName(), set.getName(), producer });
}
- public static String noSuchEventSet(Object producer, String name)
+ static String noSuchEventSet(Object producer, String name)
{
return _formatter.format("no-such-event-set", producer, name);
}
- public static String noEventMatches(Object consumer, Object producer)
+ static String noEventMatches(Object consumer, Object producer)
{
return _formatter.format("no-event-matches", consumer, producer);
}
- public static String unableToAddListener(Object producer, EventSetDescriptor set,
- Object consumer, Location location, Throwable cause)
+ static String unableToAddListener(Object producer, EventSetDescriptor set, Object consumer,
+ Location location, Throwable cause)
{
return _formatter.format("unable-to-add-listener", new Object[]
{ consumer, producer, set.getName(), location, cause });
}
- public static String unableToIntrospectClass(Class targetClass, Throwable cause)
+ static String unableToIntrospectClass(Class targetClass, Throwable cause)
{
return _formatter.format("unable-to-introspect-class", targetClass.getName(), cause);
}
- public static String unableToAddCatch(Class exceptionClass, CtMethod method, Throwable cause)
+ static String unableToAddCatch(Class exceptionClass, CtMethod method, Throwable cause)
{
return _formatter.format("unable-to-add-catch", exceptionClass.getName(), method
.getDeclaringClass().getName(), cause);
}
- public static String duplicateMethodInClass(MethodSignature ms, ClassFabImpl cf)
+ static String duplicateMethodInClass(MethodSignature ms, ClassFabImpl cf)
{
return _formatter.format("duplicate-method-in-class", ms, cf.getName());
}
- public static String unableToExtendMethod(MethodSignature ms, String className, Throwable cause)
+ static String unableToExtendMethod(MethodSignature ms, String className, Throwable cause)
{
return _formatter.format("unable-to-extend-method", ms, className, cause);
}
- public static String invalidProviderSelector(String selector)
+ static String invalidProviderSelector(String selector)
{
return _formatter.format("invalid-provider-selector", selector);
}
- public static String unknownProviderPrefix(String prefix)
+ static String unknownProviderPrefix(String prefix)
{
return _formatter.format("unknown-provider-prefix", prefix);
}
- public static String duplicateProviderPrefix(String prefix, Location priorLocation)
+ static String duplicateProviderPrefix(String prefix, Location priorLocation)
{
return _formatter.format("duplicate-provider-prefix", prefix, priorLocation);
}
- public static String invalidServicePropertyLocator(String locator)
+ static String invalidServicePropertyLocator(String locator)
{
return _formatter.format("invalid-service-property-locator", locator);
}
- public static String failureBuildingService(String serviceId, Throwable cause)
+ static String failureBuildingService(String serviceId, Throwable cause)
{
return _formatter.format("failure-building-service", serviceId, cause);
}
- public static String autowirePropertyFailure(String propertyName, String serviceId,
- Throwable cause)
+ static String autowirePropertyFailure(String propertyName, String serviceId, Throwable cause)
{
return _formatter.format("autowire-property-failure", propertyName, serviceId, cause);
}
- public static String unableToFindAutowireConstructor()
+ static String unableToFindAutowireConstructor()
{
return _formatter.getMessage("unable-to-find-autowire-constructor");
}
/** @since 1.1 */
- public static String unableToCreateInterface(String name, Exception cause)
+ static String unableToCreateInterface(String name, Exception cause)
{
return _formatter.format("unable-to-create-interface", name, cause);
}
1.4 +1 -2 jakarta-hivemind/jmx/src/test/org/apache/hivemind/management/TestMBeanRegistry.java
Index: TestMBeanRegistry.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/jmx/src/test/org/apache/hivemind/management/TestMBeanRegistry.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestMBeanRegistry.java 5 May 2005 12:44:21 -0000 1.3
+++ TestMBeanRegistry.java 13 May 2005 12:56:58 -0000 1.4
@@ -169,8 +169,7 @@
interceptLogging(MBeanRegistry.class.getName());
- MBeanRegistry mbeanRegistry = new MBeanRegistryImpl(errorHandler, log, server,
- objectNameBuilder, mBeanList);
+ new MBeanRegistryImpl(errorHandler, log, server, objectNameBuilder, mBeanList);
assertLoggedMessage("Registering MBean " + on1.toString() + " failed");
}
1.3 +1 -2 jakarta-hivemind/framework/src/java/org/apache/hivemind/conditional/ConditionalMessages.java
Index: ConditionalMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/conditional/ConditionalMessages.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConditionalMessages.java 6 Jan 2005 01:45:15 -0000 1.2
+++ ConditionalMessages.java 13 May 2005 12:56:58 -0000 1.3
@@ -22,8 +22,7 @@
*/
class ConditionalMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(
- ConditionalMessages.class, "ConditionalStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(ConditionalMessages.class);
public static String unexpectedCharacter(int position, char[] input)
{
1.5 +2 -3 jakarta-hivemind/framework/src/java/org/apache/hivemind/methodmatch/MethodMatchMessages.java
Index: MethodMatchMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/methodmatch/MethodMatchMessages.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MethodMatchMessages.java 5 Jan 2005 18:05:45 -0000 1.4
+++ MethodMatchMessages.java 13 May 2005 12:56:58 -0000 1.5
@@ -17,10 +17,9 @@
import org.apache.hivemind.Location;
import org.apache.hivemind.impl.MessageFormatter;
-final class MethodMatchMessages
+class MethodMatchMessages
{
- private static final MessageFormatter _formatter =
- new MessageFormatter(MethodMatchMessages.class, "MethodMatchStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(MethodMatchMessages.class);
public static String missingNamePattern(String methodPattern)
{
1.16 +22 -23 jakarta-hivemind/framework/src/java/org/apache/hivemind/parse/ParseMessages.java
Index: ParseMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/parse/ParseMessages.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ParseMessages.java 5 Jan 2005 18:05:37 -0000 1.15
+++ ParseMessages.java 13 May 2005 12:56:58 -0000 1.16
@@ -27,12 +27,11 @@
*
* @author Howard Lewis Ship
*/
-final class ParseMessages
+class ParseMessages
{
- private static final MessageFormatter _formatter = new MessageFormatter(ParseMessages.class,
- "ParseStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(ParseMessages.class);
- public static String dupeAttributeMapping(AttributeMappingDescriptor newDescriptor,
+ static String dupeAttributeMapping(AttributeMappingDescriptor newDescriptor,
AttributeMappingDescriptor existingDescriptor)
{
return _formatter.format(
@@ -41,82 +40,82 @@
existingDescriptor.getLocation());
}
- public static String extraMappings(Collection extraNames, ElementModel model)
+ static String extraMappings(Collection extraNames, ElementModel model)
{
return _formatter.format("extra-mappings", extraNames, model.getElementName());
}
- public static String multipleContributionsSchemas(String configurationId, Location location)
+ static String multipleContributionsSchemas(String configurationId, Location location)
{
return _formatter.format("multiple-contributions-schemas", configurationId, location);
}
- public static String multipleParametersSchemas(String serviceId, Location location)
+ static String multipleParametersSchemas(String serviceId, Location location)
{
return _formatter.format("multiple-parameters-schemas", serviceId, location);
}
- public static String notModule(String elementName, Location location)
+ static String notModule(String elementName, Location location)
{
return _formatter.format("not-module", elementName, location);
}
- public static String requiredAttribute(String name, String path, Location location)
+ static String requiredAttribute(String name, String path, Location location)
{
return _formatter.format("required-attribute", name, path, location);
}
- public static String unknownAttribute(String name, String path)
+ static String unknownAttribute(String name, String path)
{
return _formatter.format("unknown-attribute", name, path);
}
- public static String booleanAttribute(String value, String name, String path)
+ static String booleanAttribute(String value, String name, String path)
{
return _formatter.format("boolean-attribute", new Object[]
{ value, name, path });
}
- public static String invalidAttributeValue(String value, String name, String path)
+ static String invalidAttributeValue(String value, String name, String path)
{
return _formatter.format("invalid-attribute-value", new Object[]
{ value, name, path });
}
- public static String invalidNumericValue(String value, String name, String path)
+ static String invalidNumericValue(String value, String name, String path)
{
return _formatter.format("invalid-numeric-value", new Object[]
{ value, name, path });
}
- public static String unableToInitialize(Throwable cause)
+ static String unableToInitialize(Throwable cause)
{
return _formatter.format("unable-to-initialize", cause);
}
- public static String badRuleClass(String className, Location location, Throwable cause)
+ static String badRuleClass(String className, Location location, Throwable cause)
{
return _formatter.format("bad-rule-class", className, location, cause);
}
- public static String errorReadingDescriptor(Resource resource, Throwable cause)
+ static String errorReadingDescriptor(Resource resource, Throwable cause)
{
return _formatter.format("error-reading-descriptor", resource, cause);
}
- public static String missingResource(Resource resource)
+ static String missingResource(Resource resource)
{
return _formatter.format("missing-resource", resource);
}
- public static String unexpectedElement(String elementName, String elementPath)
+ static String unexpectedElement(String elementName, String elementPath)
{
return _formatter.format("unexpected-element", elementName, elementPath);
}
- public static String invalidAttributeFormat(String attributeName, String value,
- String elementPath, String formatKey)
+ static String invalidAttributeFormat(String attributeName, String value, String elementPath,
+ String formatKey)
{
String inputValueFormat = _formatter.getMessage(formatKey);
@@ -124,12 +123,12 @@
{ attributeName, value, elementPath, inputValueFormat });
}
- public static String duplicateSchema(String schemaId, Schema existingSchema)
+ static String duplicateSchema(String schemaId, Schema existingSchema)
{
return _formatter.format("duplicate-schema", schemaId, existingSchema.getLocation());
}
-
- public static String invalidElementKeyAttribute(String schemaId, Throwable cause)
+
+ static String invalidElementKeyAttribute(String schemaId, Throwable cause)
{
return _formatter.format("invalid-element-key-attribute", schemaId, cause);
}
1.6 +22 -35 jakarta-hivemind/library/src/java/org/apache/hivemind/lib/pipeline/PipelineMessages.java
Index: PipelineMessages.java
===================================================================
RCS file: /home/cvs/jakarta-hivemind/library/src/java/org/apache/hivemind/lib/pipeline/PipelineMessages.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PipelineMessages.java 5 Jan 2005 18:05:49 -0000 1.5
+++ PipelineMessages.java 13 May 2005 12:56:58 -0000 1.6
@@ -21,59 +21,46 @@
/**
* Messages for the lib.pipeline package.
- *
+ *
* @author Howard Lewis Ship
*/
-final class PipelineMessages
+class PipelineMessages
{
- private static MessageFormatter _formatter =
- new MessageFormatter(PipelineMessages.class, "PipelineStrings");
+ protected static MessageFormatter _formatter = new MessageFormatter(PipelineMessages.class);
- public static String bridgeInstanceDescription(String serviceId, Class serviceInterface)
+ static String bridgeInstanceDescription(String serviceId, Class serviceInterface)
{
- return _formatter.format(
- "bridge-instance-description",
- serviceId,
- serviceInterface.getName());
+ return _formatter.format("bridge-instance-description", serviceId, serviceInterface
+ .getName());
}
- public static String extraFilterMethod(
- MethodSignature ms,
- Class filterInterface,
- Class serviceInterface,
- String serviceId)
+ static String extraFilterMethod(MethodSignature ms, Class filterInterface,
+ Class serviceInterface, String serviceId)
{
- return _formatter.format(
- "extra-filter-method",
- new Object[] { ms, filterInterface.getName(), serviceInterface.getName(), serviceId });
+ return _formatter.format("extra-filter-method", new Object[]
+ { ms, filterInterface.getName(), serviceInterface.getName(), serviceId });
}
- public static String unmatchedServiceMethod(MethodSignature ms, Class filterInterface)
+ static String unmatchedServiceMethod(MethodSignature ms, Class filterInterface)
{
return _formatter.format("unmatched-service-method", ms, filterInterface.getName());
}
- public static String duplicateTerminator(
- Object terminator,
- String serviceId,
- Object existingTerminator,
- Location existingLocation)
+ static String duplicateTerminator(Object terminator, String serviceId,
+ Object existingTerminator, Location existingLocation)
{
- return _formatter.format(
- "duplicate-terminator",
- new Object[] {
- terminator,
- serviceId,
- existingTerminator,
- HiveMind.getLocationString(existingLocation)});
+ return _formatter
+ .format("duplicate-terminator", new Object[]
+ { terminator, serviceId, existingTerminator,
+ HiveMind.getLocationString(existingLocation) });
}
- public static String incorrectInterface(Object instance, Class interfaceType, String serviceId)
+ static String incorrectInterface(Object instance, Class interfaceType, String serviceId)
{
return _formatter.format(
- "incorrect-interface",
- instance,
- interfaceType.getName(),
- serviceId);
+ "incorrect-interface",
+ instance,
+ interfaceType.getName(),
+ serviceId);
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org