org.springframework.context.support
Class StaticMessageSource
org.springframework.context.support.AbstractNestingMessageSource
|
+--org.springframework.context.support.StaticMessageSource
- public class StaticMessageSource
- extends AbstractNestingMessageSource
Simple implementation of NestingMessageSource that allows messages
to be held in a Java object, and added programmatically.
This class now supports internationalization.
Intended for testing, rather than use production systems.
- Author:
- Rod Johnson
Method Summary |
void | addMessage(String code, Locale locale, String message) Associate the given message with the given code. |
String | toString() |
addMessage
public void addMessage(String code, Locale locale, String message)
- Associate the given message with the given code.
- Parameters:
- code - lookup code
- locale - locale message should be found within
- message - message associated with this lookup code
toString
public String toString()
to Class java.util.Map