org.apache.commons.cli2.resource
Class ResourceHelper

java.lang.Object
  extended by org.apache.commons.cli2.resource.ResourceHelper

public class ResourceHelper
extends Object

A utility class used to provide internationalisation support.

Author:
John Keyes

Method Summary
 String getBundleName()
           
 String getMessage(String key)
          Returns the message for the specified key.
 String getMessage(String key, Object value)
          Returns the message for the specified key and argument.
 String getMessage(String key, Object[] values)
          Returns the message for the specified key and arguments.
 String getMessage(String key, Object value1, Object value2)
          Returns the message for the specified key and arguments.
 String getMessage(String key, Object value1, Object value2, Object value3)
          Returns the message for the specified key and arguments.
static ResourceHelper getResourceHelper()
          Gets the ResourceHelper appropriate to the current locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBundleName

public String getBundleName()

getResourceHelper

public static ResourceHelper getResourceHelper()
Gets the ResourceHelper appropriate to the current locale.

Returns:
a ResourceHelper

getMessage

public String getMessage(String key)
Returns the message for the specified key.

Parameters:
key - the unique identifier of the message
Returns:
String the formatted String

getMessage

public String getMessage(String key,
                         Object value)
Returns the message for the specified key and argument.

Parameters:
key - the unique identifier of the message
value - the argument value
Returns:
String the formatted String

getMessage

public String getMessage(String key,
                         Object value1,
                         Object value2)
Returns the message for the specified key and arguments.

Parameters:
key - the unique identifier of the message
value1 - an argument value
value2 - an argument value
Returns:
String the formatted String

getMessage

public String getMessage(String key,
                         Object value1,
                         Object value2,
                         Object value3)
Returns the message for the specified key and arguments.

Parameters:
key - the unique identifier of the message
value1 - an argument value
value2 - an argument value
value3 - an argument value
Returns:
String the formatted String

getMessage

public String getMessage(String key,
                         Object[] values)
Returns the message for the specified key and arguments.

Parameters:
key - the unique identifier of the message
values - argument values
Returns:
String the formatted String


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.