类 LocaleConfig
java.lang.Object
org.apache.velocity.tools.generic.SafeConfig
org.apache.velocity.tools.generic.LocaleConfig
- 直接已知子类:
ConversionTool,DisplayTool,FormatConfig,ResourceTool
Implements common logic and constants for tools which allow their
default
Locale to be configured.- 从以下版本开始:
- VelocityTools 2.0
- 作者:
- Nathan Bubna
-
字段概要
字段从类继承的字段 org.apache.velocity.tools.generic.SafeConfig
LOCK_CONFIG_KEY, log, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY -
构造器概要
构造器 -
方法概要
从类继承的方法 org.apache.velocity.tools.generic.SafeConfig
configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig, setSafeMode
-
字段详细资料
-
DEFAULT_LOCALE
The defaultLocaleto be used when none is specified.
-
-
构造器详细资料
-
LocaleConfig
public LocaleConfig()
-
-
方法详细资料
-
configure
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- 参数:
values- configuration values
-
getLocale
This returns the configured defaultLocalefor this tool.- 返回:
- the default
Locale
-
setLocale
Sets the default locale for this instance.- 参数:
locale- default locale to use
-
toLocale
- 参数:
value- the object to be converted- 返回:
- a
Localefor the specified value ornullif the value is null or the conversion failed - 从以下版本开始:
- VelocityTools 3.0
-