| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Implements Text manipulations
| Field Summary | |
private static String | mySpecDelimiterThe delimiter, which rounds replacing macros |
| Method Summary | |
private static String | expandMacro(String macro, Properties macros, Stack pendingMacros)Implements recursive expanding of a single macro |
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 |
private static String | expandString(String stringWithMacros, Properties macros, Stack pendingMacros)Implements recursive expanding of string with macros |
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. |
| Field Detail |
private static String mySpecDelimiter
| Method Detail |
private static String expandMacro(String macro, Properties macros, Stack pendingMacros)
throws java.lang.IllegalArgumentException
public static String expandString(String stringWithMacros, Properties macros)
throws java.lang.IllegalArgumentException
private static String expandString(String stringWithMacros, Properties macros, Stack pendingMacros)
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 | |||||||||