|
|||||||||
| Home >> All >> org >> apache >> hivemind >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.hivemind.impl
Class MessageFormatter

java.lang.Objectorg.apache.hivemind.impl.AbstractMessages
org.apache.hivemind.impl.MessageFormatter
- All Implemented Interfaces:
- org.apache.hivemind.Messages
- public class MessageFormatter
- extends AbstractMessages
A wrapper around java.util.ResourceBundle that makes it easier to access and format messages.
| Field Summary | |
private java.util.ResourceBundle |
_bundle
|
private org.apache.commons.logging.Log |
_log
|
| Constructor Summary | |
MessageFormatter(java.lang.Class referenceClass)
Assumes that the bundle name is the same as the reference class, with "Messages" stripped off, and "Strings" appended. |
|
MessageFormatter(java.lang.Class referenceClass,
java.lang.String name)
|
|
MessageFormatter(org.apache.commons.logging.Log log,
java.lang.Class referenceClass,
java.lang.String name)
|
|
MessageFormatter(org.apache.commons.logging.Log log,
java.util.ResourceBundle bundle)
|
|
MessageFormatter(org.apache.commons.logging.Log log,
java.lang.String bundleName)
|
|
| Method Summary | |
protected java.lang.String |
findMessage(java.lang.String key)
Concrete implementations must implement this method. |
protected java.util.Locale |
getLocale()
Concrete implementations must provide a non-null Locale. |
private static java.lang.String |
getResourceBundleName(java.lang.Class referenceClass,
java.lang.String name)
|
private static java.lang.String |
getStringsName(java.lang.Class referenceClass)
|
| Methods inherited from class org.apache.hivemind.impl.AbstractMessages |
format, format, format, format, getMessage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_log
private org.apache.commons.logging.Log _log
_bundle
private java.util.ResourceBundle _bundle
| Constructor Detail |
MessageFormatter
public MessageFormatter(org.apache.commons.logging.Log log, java.util.ResourceBundle bundle)
MessageFormatter
public MessageFormatter(java.lang.Class referenceClass)
- Assumes that the bundle name is the same as the reference class, with "Messages" stripped
off, and "Strings" appended.
- Since:
- 1.1
MessageFormatter
public MessageFormatter(java.lang.Class referenceClass, java.lang.String name)
MessageFormatter
public MessageFormatter(org.apache.commons.logging.Log log, java.lang.Class referenceClass, java.lang.String name)
MessageFormatter
public MessageFormatter(org.apache.commons.logging.Log log, java.lang.String bundleName)
| Method Detail |
findMessage
protected java.lang.String findMessage(java.lang.String key)
- Description copied from class:
AbstractMessages - Concrete implementations must implement this method.
- Specified by:
findMessagein classAbstractMessages
getLocale
protected java.util.Locale getLocale()
- Description copied from class:
AbstractMessages - Concrete implementations must provide a non-null Locale.
- Specified by:
getLocalein classAbstractMessages
getStringsName
private static java.lang.String getStringsName(java.lang.Class referenceClass)
getResourceBundleName
private static java.lang.String getResourceBundleName(java.lang.Class referenceClass, java.lang.String name)
|
|||||||||
| Home >> All >> org >> apache >> hivemind >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC