public static boolean hasToken(String s) { if (s == null) { return false; } if (GFLauncherUtils.isWindows() && hasWindowsToken(s)) { return true; } if (s.indexOf(Token.TOKEN_START) >= 0) { return true; } return false; } ///////////////////////////////////////////////////////////////////////////
public static boolean hasToken(String s) { if (s == null) { return false; } if (GFLauncherUtils.isWindows() && hasWindowsToken(s)) { return true; } if (s.indexOf(Token.TOKEN_START) >= 0) { return true; } return false; } ///////////////////////////////////////////////////////////////////////////
public static boolean hasToken(String s) { if (s == null) { return false; } if (GFLauncherUtils.isWindows() && hasWindowsToken(s)) { return true; } if (s.indexOf(Token.TOKEN_START) >= 0) { return true; } return false; } ///////////////////////////////////////////////////////////////////////////
/** * Replace $[variables} with a matching property in the map * @param s String to be token-replaced * @return the replaced String */ public String resolve(String s) { if(s == null || s.length() <= 0) return s; if (hasWindowsToken(s)) { s = windowsToUnixTokens(s); } List<Token> tokens = getTokens(s); String resolved = s; for (Token token : tokens) { resolved = GFLauncherUtils.replace(resolved, token.token, token.value); } return resolved; }
/** * Replace $[variables} with a matching property in the map * @param s String to be token-replaced * @return the replaced String */ public String resolve(String s) { if(s == null || s.length() <= 0) return s; if (hasWindowsToken(s)) { s = windowsToUnixTokens(s); } List<Token> tokens = getTokens(s); String resolved = s; for (Token token : tokens) { resolved = GFLauncherUtils.replace(resolved, token.token, token.value); } return resolved; }
/** * Replace $[variables} with a matching property in the map * @param s String to be token-replaced * @return the replaced String */ public String resolve(String s) { if(s == null || s.length() <= 0) return s; if (hasWindowsToken(s)) { s = windowsToUnixTokens(s); } List<Token> tokens = getTokens(s); String resolved = s; for (Token token : tokens) { resolved = GFLauncherUtils.replace(resolved, token.token, token.value); } return resolved; }