public class FormatUtils extends Object
Constructor and Description |
---|
FormatUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
constructTokenMessage(String key)
Constructs a token suitable for use by a default
RestrictedTokenMessageTranslator and a ResourceBundleTokenTranslator.
|
static String |
constructTokenMessage(String key,
String[] args)
Returns a string in the form '%{key[:arg0[,arg1,...,argn]]}',
where n is the length of the 'args' array.
|
static String |
convertIllegalCharacters(String s)
Converts an arbitrary String to be used with a default
RestrictedTokenMessageTranslator and a ResourceBundleTokenTranslator.
|
public static String constructTokenMessage(String key, String[] args)
key
- The key into the resource bundle that will be decoded later
by translate()args
- The arguments to use for the MessageFormatResourceBundleTokenTranslator
,
RestrictedTokenMessageTranslator
public static String constructTokenMessage(String key)
key
- to be converted to a tokenconstructTokenMessage(java.lang.String, java.lang.String[])
public static String convertIllegalCharacters(String s)
s
- string to be convertedCopyright © 2015. All Rights Reserved.