net.sf.m2prototype.util
Class Messages

java.lang.Object
  extended by net.sf.m2prototype.util.Messages

public final class Messages
extends java.lang.Object

Messages provides access to human-presented text. Text for m2prototype may be modified in net/sf/m2prototype/util/messages.properties.

Design Pattern: Static Factory Method

Version:
1.0
Author:
GNU Know Who!

Method Summary
static java.lang.String getString(java.lang.String key)
          Gets a String value corresponding to a particular lookup key.
static java.lang.String getString(java.lang.String key, java.lang.Object param)
          Gets a String value corresponding to a particular lookup key and performs the appropriate substitution based on an additional param.
static java.lang.String getString(java.lang.String key, java.lang.Object[] params)
          Gets a String value corresponding to a particular lookup key and performs the appropriate substitution based on additional params.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static java.lang.String getString(java.lang.String key)
Gets a String value corresponding to a particular lookup key.

Parameters:
key - The key to be used for looking up a message.
Returns:
the Message requested by the lookup key.

getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.Object[] params)
Gets a String value corresponding to a particular lookup key and performs the appropriate substitution based on additional params.

Parameters:
key - the key to be used for looking up a message template.
params - the values to be substituted into the message template.
Returns:
the result of substituting the params into the message template.

getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.Object param)
Gets a String value corresponding to a particular lookup key and performs the appropriate substitution based on an additional param.

Parameters:
key - the key to be used for looking up a message template.
param - the value to be substituted into the message template.
Returns:
the result of substituting the param into the message template.


Copyright © 2006 SourceForge.net. All Rights Reserved.