@@ -0,0 +1,2356 @@
+/*%0A# Licensed Materials - Property of IBM%0A# Copyright IBM Corp. 2016  %0A */%0Apackage com.ibm.streamsx.topology.generator.spl;%0A%0Aimport com.google.gson.JsonArray;%0Aimport com.google.gson.JsonElement;%0Aimport com.google.gson.JsonObject;%0Aimport com.ibm.streamsx.topology.function.Consumer;%0A%0Apublic class GsonUtilities %7B%0A    /**%0A     * Perform an action on every JsonObject in an array.%0A     */%0A    static void objectArray(JsonObject object, String property, Consumer%3CJsonObject%3E action) %7B%0A        JsonArray array = array(object, property);%0A        if (array == null)%0A            return;%0A        array.forEach(e -%3E action.accept(e.getAsJsonObject()));%0A    %7D%0A    %0A    /**%0A     * Perform an action on every String in an array.%0A     */%0A    static void stringArray(JsonObject object, String property, Consumer%3CString%3E action) %7B%0A        JsonArray array = array(object, property);%0A        if (array == null)%0A            return;%0A        array.forEach(e -%3E action.accept(e.getAsString()));%0A    %7D%0A    %0A    /**%0A     * Return a Json array.%0A     * Returns null if the array is empty or not present.%0A     */%0A    static JsonArray array(JsonObject object, String property) %7B%0A        if (object.has(property)) %7B%0A            JsonElement je = object.get(property);%0A            if (je.isJsonNull())%0A                return null;%0A            return je.getAsJsonArray();%0A        %7D%0A        return null;%0A    %7D%0A    /**%0A     * Return a Json object.%0A     * Returns null if the object is not present or null.%0A     */%0A    static JsonObject jobject(JsonObject object, String property) %7B%0A        if (object.has(property)) %7B%0A            JsonElement je = object.get(property);%0A            if (je.isJsonNull())%0A                return null;%0A            return je.getAsJsonObject();%0A        %7D%0A        return null;%0A    %7D%0A    static String jstring(JsonObject object, String property) %7B%0A        if (object.has(property)) %7B%0A            JsonElement je = object.get(property);%0A            if (je.isJsonNull())%0A                return null;%0A            return je.getAsString();%0A        %7D%0A        return null;%0A    %7D%0A    static boolean jboolean(JsonObject object, String property) %7B%0A        if (object.has(property)) %7B%0A            JsonElement je = object.get(property);%0A            if (je.isJsonNull())%0A                return false;%0A            return je.getAsBoolean();%0A        %7D%0A        return false;%0A    %7D%0A%7D%0A

Add missing file