|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.function.ext.LocaleFunctionSupport
An abastract base class for Locale-specific extension functions. This class provides convenience methods that can be inherited, specifically to find a Locale from an XPath function argument value.
Constructor Summary | |
LocaleFunctionSupport()
|
Method Summary | |
protected java.util.Locale |
findLocale(java.lang.String localeText)
Tries to find a Locale instance by name using xml:lang style encodings like 'en', 'en-US', 'en-US-Brooklyn'. |
protected java.util.Locale |
findLocaleForLanguage(java.lang.String language)
Finds the locale with the given language name with no country or variant, such as Locale.ENGLISH or Locale.FRENCH |
protected java.util.Locale |
getLocale(java.lang.Object value,
Navigator navigator)
Attempts to convert the given function argument value into a Locale either via casting, extracting it from a List or looking up the named Locale using reflection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jaxen.Function |
call |
Constructor Detail |
public LocaleFunctionSupport()
Method Detail |
protected java.util.Locale getLocale(java.lang.Object value, Navigator navigator)
value
- is either a Locale, a List containing a Locale
or a String containing the name of a Locale
as defined by the Locale static members.
protected java.util.Locale findLocale(java.lang.String localeText)
localeText
- is the xml:lang encoding of a Locale
protected java.util.Locale findLocaleForLanguage(java.lang.String language)
language
- is the language code to look for
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |