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 SummaryConstructorsConstructorDescriptionSimpleLocaleContext(@Nullable Locale locale) Create a newSimpleLocaleContextthat exposes the specifiedLocale.
- 
Method Summary
- 
Constructor Details- 
SimpleLocaleContextCreate a newSimpleLocaleContextthat exposes the specifiedLocale.Every getLocale()call will return this locale.- Parameters:
- locale- the- Localeto expose, or- nullfor no specific one
 
 
- 
- 
Method Details- 
getLocaleDescription copied from interface:LocaleContextReturn the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.- Specified by:
- getLocalein interface- LocaleContext
- Returns:
- the current Locale, or nullif no specific Locale associated
 
- 
toString
 
-