All Downloads are FREE. Search and download functionalities are using the official Maven repository.

quark.spi_api_tracing.Functions Maven / Gradle / Ivy

There is a newer version: 2.0.37
Show newest version
/* 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()))) + (")");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy