Package org.springframework.context.i18n
Class SimpleLocaleContext
java.lang.Object
org.springframework.context.i18n.SimpleLocaleContext
- All Implemented Interfaces:
 LocaleContext
- Direct Known Subclasses:
 SimpleTimeZoneAwareLocaleContext
Simple implementation of the 
LocaleContext interface,
 always returning a specified Locale.- Since:
 - 1.2
 - Author:
 - Juergen Hoeller
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionSimpleLocaleContext(Locale locale) Create a new SimpleLocaleContext that exposes the specified Locale. - 
Method Summary
 
- 
Constructor Details
- 
SimpleLocaleContext
Create a new SimpleLocaleContext that exposes the specified Locale. EverygetLocale()call will return this Locale.- Parameters:
 locale- the Locale to expose, ornullfor no specific one
 
 - 
 - 
Method Details
- 
getLocale
Description copied from interface:LocaleContextReturn the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.- Specified by:
 getLocalein interfaceLocaleContext- Returns:
 - the current Locale, or 
nullif no specific Locale associated 
 - 
toString
 
 -