| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Implements Text manipulations
| Method Summary | |
static String | expandString(String stringWithMacros, Properties macros)Replaces all occurences of macros in the string Examples: stringWithMacros = "%%a%% = %%b%% + %%c%%"; macros = {{"a", "5"}, {"b", "2"}, {"c", "3"}} result: "5 = 2 + 3" stringWithMacros = "%%a%% = %%b%% + %%c%%"; macros = {{"a", "6"}, {"b", "%%c%%"}, {"c", "3"}} result: "6 = 3 + 3" stringWithMacros = "%%a%% = %%b%% + %%c%%"; macros = {{"a", "6"}, {"b", "%%c%%"}, {"c", "%%b%%"}} result: thrown IllegalArgumentException - recursion found |
static String | getPrefix(String str, char separator)Returns prefix of the line Example: getPrefix ("WebLogic.PublicID", '.') will return "WebLogic" getPrefix ("WebLogic.PublicID", ',') will return "WebLogic.PublicID" |
static String | replace(String source, String searchFor, String replaceWith)Replaces a part(s) of the source string by new contents The method replaces all occurences of searchFor in original string. |
static String | replaceMacro(String source, String macroName, String macroValue)Calls replace method to replace all occurence of source macroName rounded with mySpecDelimiter by macroValue. |
| Method Detail |
public static String expandString(String stringWithMacros, Properties macros)
throws java.lang.IllegalArgumentException
public static String getPrefix(String str, char separator)
public static String replace(String source, String searchFor, String replaceWith)
public static String replaceMacro(String source, String macroName, String macroValue)
| Association Links |
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||