net.ninthtest.security
Class Messages

java.lang.Object
  extended by net.ninthtest.security.Messages

public final class Messages
extends Object

A utility class for retrieving and formatting localized messages.

Version:
1.0
Author:
Matthew Zipay (mattz@ninthtest.info)

Method Summary
static String getMessage(String key)
          Returns the localized message associated with key.
static String getMessage(String key, Object... arguments)
          Returns the localized message associated with key, formatted using arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMessage

public static final String getMessage(String key)
Returns the localized message associated with key.

Parameters:
key - the message key
Returns:
the localized message, or key itself if the message is not found

getMessage

public static final String getMessage(String key,
                                      Object... arguments)
Returns the localized message associated with key, formatted using arguments.

Parameters:
key - the message key
arguments - values used as positional substitutions into the message
Returns:
the formatted, localized message; or key itself if the message is not found


Copyright © 2010-2014 Matthew Zipay. All Rights Reserved.