org.springframework.context.i18n

## 类 SimpleLocaleContext

- java.lang.Object
- - org.springframework.context.i18n.SimpleLocaleContext

- 所有已实现的接口:
    LocaleContext
  直接已知子类:
    SimpleTimeZoneAwareLocaleContext

      public class SimpleLocaleContext
      extends Object
      implements LocaleContext

  Simple implementation of the `LocaleContext` interface, always returning a specified `Locale`.
  从以下版本开始:
    1.2
  作者:
    Juergen Hoeller
  另请参阅:
    `LocaleContextHolder.setLocaleContext(org.springframework.context.i18n.LocaleContext)`, `LocaleContextHolder.getLocale()`, `SimpleTimeZoneAwareLocaleContext`

- - ### 构造器概要

    构造器
    构造器和说明
    `SimpleLocaleContext(Locale locale)` Create a new SimpleLocaleContext that exposes the specified Locale.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Locale` | `getLocale()` Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.
    `String` | `toString()`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### SimpleLocaleContext

          public SimpleLocaleContext(@Nullable
                                     Locale locale)

      Create a new SimpleLocaleContext that exposes the specified Locale. Every `getLocale()` call will return this Locale.
      参数:
        `locale` - the Locale to expose, or `null` for no specific one

  - ### 方法详细资料

    - #### getLocale

          @Nullable
          public Locale getLocale()

      从接口复制的说明: `LocaleContext`
      Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.
      指定者:
        `getLocale` 在接口中 `LocaleContext`
      返回:
        the current Locale, or `null` if no specific Locale associated

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`