org.springframework.format.datetime.joda

## 类 JodaTimeContextHolder

- java.lang.Object
- - org.springframework.format.datetime.joda.JodaTimeContextHolder

-     public final class JodaTimeContextHolder
      extends Object

  A holder for a thread-local `JodaTimeContext` with user-specific Joda-Time settings.
  从以下版本开始:
    3.0
  作者:
    Keith Donald, Juergen Hoeller
  另请参阅:
    `LocaleContextHolder`

- - ### 构造器概要

    构造器
    构造器和说明
    `JodaTimeContextHolder()`

  - ### 方法概要

    所有方法 静态方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `static DateTimeFormatter` | `getFormatter(DateTimeFormatter formatter, Locale locale)` Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
    `static JodaTimeContext` | `getJodaTimeContext()` Return the JodaTimeContext associated with the current thread, if any.
    `static void` | `resetJodaTimeContext()` Reset the JodaTimeContext for the current thread.
    `static void` | `setJodaTimeContext(JodaTimeContext jodaTimeContext)` Associate the given JodaTimeContext with the current thread.

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

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

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

    - #### JodaTimeContextHolder

          public JodaTimeContextHolder()

  - ### 方法详细资料

    - #### resetJodaTimeContext

          public static void resetJodaTimeContext()

      Reset the JodaTimeContext for the current thread.

    - #### setJodaTimeContext

          public static void setJodaTimeContext(@Nullable
                                                JodaTimeContext jodaTimeContext)

      Associate the given JodaTimeContext with the current thread.
      参数:
        `jodaTimeContext` - the current JodaTimeContext, or `null` to reset the thread-bound context

    - #### getJodaTimeContext

          @Nullable
          public static JodaTimeContext getJodaTimeContext()

      Return the JodaTimeContext associated with the current thread, if any.
      返回:
        the current JodaTimeContext, or `null` if none

    - #### getFormatter

          public static DateTimeFormatter getFormatter(DateTimeFormatter formatter,
                                                       @Nullable
                                                       Locale locale)

      Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
      参数:
        `formatter` - the base formatter that establishes default formatting rules (generally user independent)
        `locale` - the current user locale (may be `null` if not known)
      返回:
        the user-specific DateTimeFormatter