Package org.marketcetera.util.l10n
Class MessageInfo
- java.lang.Object
-
- org.marketcetera.util.l10n.MessageInfo
-
- Direct Known Subclasses:
I18NMessageInfo,PropertyMessageInfo
public abstract class MessageInfo extends Object
Holder of meta-information about a generic message.- Since:
- 0.6.0
- Version:
- $Id: MessageInfo.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- tlerios@marketcetera.com
-
-
Field Summary
Fields Modifier and Type Field Description static MessageInfo[]EMPTY_ARRAYAn empty array of class instances.private StringmKeyprivate intmParamCount
-
Constructor Summary
Constructors Constructor Description MessageInfo(String key, int paramCount)Creates a new meta-information holder with the given message key and parameter count.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)StringgetKey()Returns the receiver's message key.static PropertiesgetList(MessageInfo[] info)Returns the given collection of message information as a properties object.intgetParamCount()Returns the receiver's parameter count.inthashCode()
-
-
-
Field Detail
-
EMPTY_ARRAY
public static final MessageInfo[] EMPTY_ARRAY
An empty array of class instances.
-
mKey
private String mKey
-
mParamCount
private int mParamCount
-
-
Constructor Detail
-
MessageInfo
public MessageInfo(String key, int paramCount)
Creates a new meta-information holder with the given message key and parameter count.- Parameters:
key- The key.paramCount- The parameter count; -1 signifies an unknown count.
-
-
Method Detail
-
getList
public static Properties getList(MessageInfo[] info)
Returns the given collection of message information as a properties object. For each message in order, one property is created (or overwritten, if there is a name conflict): its name is the message key, and its value is the key alongside all argument placeholders.- Parameters:
info- The collection of message information.- Returns:
- The properties object.
-
getKey
public String getKey()
Returns the receiver's message key.- Returns:
- The key.
-
getParamCount
public int getParamCount()
Returns the receiver's parameter count.- Returns:
- The count; -1 signifies an unknown count.
-
-