|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--org.apache.avalon.excalibur.i18n.Resources
A class to simplify extracting localized strings, icons and other common resources from a ResourceBundle. Reworked to mirror behaviour of StringManager from Tomcat (format() to getString()).
コンストラクタの概要 | |
Resources(java.lang.String baseName)
Constructor that builds a manager in default locale. |
|
Resources(java.lang.String baseName,
java.lang.ClassLoader classLoader)
Constructor that builds a manager in default locale using specified ClassLoader. |
|
Resources(java.lang.String baseName,
java.util.Locale locale)
Constructor that builds a manager in specified locale. |
|
Resources(java.lang.String baseName,
java.util.Locale locale,
java.lang.ClassLoader classLoader)
Constructor that builds a manager in specified locale. |
メソッドの概要 | |
java.lang.String |
format(java.lang.String key,
java.lang.Object[] args)
Retrieve a string from resource bundle and format it with specified args. |
boolean |
getBoolean(java.lang.String key)
Retrieve a boolean from bundle. |
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Retrieve a boolean from bundle. |
java.util.ResourceBundle |
getBundle()
Retrieve underlying ResourceBundle. |
byte |
getByte(java.lang.String key)
Retrieve a byte from bundle. |
byte |
getByte(java.lang.String key,
byte defaultValue)
Retrieve a byte from bundle. |
char |
getChar(java.lang.String key)
Retrieve a char from bundle. |
char |
getChar(java.lang.String key,
char defaultValue)
Retrieve a char from bundle. |
java.util.Date |
getDate(java.lang.String key)
Retrieve a date from bundle. |
java.util.Date |
getDate(java.lang.String key,
java.util.Date defaultValue)
Retrieve a date from bundle. |
java.util.Date |
getDateTime(java.lang.String key)
Retrieve a date + time from bundle. |
java.util.Date |
getDateTime(java.lang.String key,
java.util.Date defaultValue)
Retrieve a time from bundle. |
double |
getDouble(java.lang.String key)
Retrieve a double from bundle. |
double |
getDouble(java.lang.String key,
double defaultValue)
Retrieve a double from bundle. |
float |
getFloat(java.lang.String key)
Retrieve a float from bundle. |
float |
getFloat(java.lang.String key,
float defaultValue)
Retrieve a float from bundle. |
int |
getInteger(java.lang.String key)
Retrieve a integer from bundle. |
int |
getInteger(java.lang.String key,
int defaultValue)
Retrieve a integer from bundle. |
long |
getLong(java.lang.String key)
Retrieve a long from bundle. |
long |
getLong(java.lang.String key,
long defaultValue)
Retrieve a long from bundle. |
short |
getShort(java.lang.String key)
Retrieve a short from bundle. |
short |
getShort(java.lang.String key,
short defaultValue)
Retrieve a short from bundle. |
java.lang.String |
getString(java.lang.String key)
Retrieve a raw string from bundle. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg1)
Retrieve a string from resource bundle and format it with specified args. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2)
Retrieve a string from resource bundle and format it with specified args. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Retrieve a string from resource bundle and format it with specified args. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Retrieve a string from resource bundle and format it with specified args. |
java.lang.String |
getString(java.lang.String key,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4,
java.lang.Object arg5)
Retrieve a string from resource bundle and format it with specified args. |
java.util.Date |
getTime(java.lang.String key)
Retrieve a time from bundle. |
java.util.Date |
getTime(java.lang.String key,
java.util.Date defaultValue)
Retrieve a time from bundle. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public Resources(java.lang.String baseName)
baseName
- the base name of ResourceBundlepublic Resources(java.lang.String baseName, java.lang.ClassLoader classLoader)
baseName
- the base name of ResourceBundleclassLoader
- the classLoader to load ResourceBundle frompublic Resources(java.lang.String baseName, java.util.Locale locale)
baseName
- the base name of ResourceBundlelocale
- the Locale for resource bundlepublic Resources(java.lang.String baseName, java.util.Locale locale, java.lang.ClassLoader classLoader)
baseName
- the base name of ResourceBundlelocale
- the Locale for resource bundleclassLoader
- the classLoader to load ResourceBundle fromメソッドの詳細 |
public boolean getBoolean(java.lang.String key, boolean defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic boolean getBoolean(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic byte getByte(java.lang.String key, byte defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic byte getByte(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic char getChar(java.lang.String key, char defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic char getChar(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic short getShort(java.lang.String key, short defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic short getShort(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic int getInteger(java.lang.String key, int defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic int getInteger(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic long getLong(java.lang.String key, long defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic long getLong(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic float getFloat(java.lang.String key, float defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic float getFloat(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic double getDouble(java.lang.String key, double defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic double getDouble(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic java.util.Date getDate(java.lang.String key, java.util.Date defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic java.util.Date getDate(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic java.util.Date getTime(java.lang.String key, java.util.Date defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic java.util.Date getTime(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic java.util.Date getDateTime(java.lang.String key, java.util.Date defaultValue) throws java.util.MissingResourceException
key
- the key of resourcedefaultValue
- the default value if key is missingpublic java.util.Date getDateTime(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic java.lang.String getString(java.lang.String key) throws java.util.MissingResourceException
key
- the key of resourcepublic java.lang.String getString(java.lang.String key, java.lang.Object arg1)
key
- the key for resourcearg1
- an argpublic java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2)
key
- the key for resourcearg1
- an argarg2
- an argpublic java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
key
- the key for resourcearg1
- an argarg2
- an argarg3
- an argpublic java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
key
- the key for resourcearg1
- an argarg2
- an argarg3
- an argarg4
- an argpublic java.lang.String getString(java.lang.String key, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.Object arg5)
key
- the key for resourcearg1
- an argarg2
- an argarg3
- an argarg4
- an argarg5
- an argpublic java.lang.String format(java.lang.String key, java.lang.Object[] args)
key
- the key for resourceargs
- an array of argspublic final java.util.ResourceBundle getBundle() throws java.util.MissingResourceException
java.util.MissingResourceException
- if an error occurs
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |