quark.spi_api_tracing.Functions Maven / Gradle / Ivy
/* Quark 1.0.452 run at 2016-11-11 16:09:46.008093 */
package quark.spi_api_tracing;
public class Functions {
static datawire_mdk_md.Root root = new datawire_mdk_md.Root();
public static String quote(String str) {
if (((str).indexOf("\\")) >= (0)) {
str = io.datawire.quark.runtime.Builtins.join(("\\\\"), (new java.util.ArrayList(java.util.Arrays.asList((str).split(java.util.regex.Pattern.quote("\\"), -1)))));
}
if (((str).indexOf("\n")) >= (0)) {
str = io.datawire.quark.runtime.Builtins.join(("\\n"), (new java.util.ArrayList(java.util.Arrays.asList((str).split(java.util.regex.Pattern.quote("\n"), -1)))));
}
if (((str).indexOf("\"")) >= (0)) {
str = io.datawire.quark.runtime.Builtins.join(("\\\""), (new java.util.ArrayList(java.util.Arrays.asList((str).split(java.util.regex.Pattern.quote("\""), -1)))));
}
return (("\"") + (str)) + ("\"");
}
public static String quote_error(quark.error.Error error) {
return ((((quark.reflect.Class.get(io.datawire.quark.runtime.Builtins._getClass(error))).getName()) + ("(")) + (Functions.quote((error).getMessage()))) + (")");
}
}