Class 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 Detail

      • EMPTY_ARRAY

        public static final MessageInfo[] EMPTY_ARRAY
        An empty array of class instances.
      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object