类 LocaleConfig

java.lang.Object
org.apache.velocity.tools.generic.SafeConfig
org.apache.velocity.tools.generic.LocaleConfig
直接已知子类:
ConversionTool, DisplayTool, FormatConfig, ResourceTool

public class LocaleConfig extends SafeConfig
Implements common logic and constants for tools which allow their default Locale to be configured.
从以下版本开始:
VelocityTools 2.0
作者:
Nathan Bubna
  • 字段详细资料

    • DEFAULT_LOCALE

      public static final Locale DEFAULT_LOCALE
      The default Locale to be used when none is specified.
    • locale

      private Locale locale
  • 构造器详细资料

    • LocaleConfig

      public LocaleConfig()
  • 方法详细资料

    • configure

      protected void configure(ValueParser values)
      Does the actual configuration. This is protected, so subclasses may share the same ValueParser and call configure at any time, while preventing templates from doing so when configure(Map) is locked.
      覆盖:
      configure 在类中 SafeConfig
    • getLocale

      public Locale getLocale()
      This returns the configured default Locale for this tool.
      返回:
      the default Locale
    • setLocale

      protected void setLocale(Locale locale)
      Sets the default locale for this instance.