@Test void testMergingJsonObjectBuilder() { JsonObjectBuilder builder = MetricsSupport.createMergingJsonObjectBuilder(JSON.createObjectBuilder()); builder.add("commonObj", JSON.createObjectBuilder() .add("intA", 4) .add("longB", 6l)) .add("commonArray", JSON.createArrayBuilder() .add("integration") .add(6)) .add("otherStuff", "this really is other stuff") .add("commonArray", JSON.createArrayBuilder() .add("demo") .add(7)) .add("commonObj", JSON.createObjectBuilder() .add("doubleA", 8d) .add("differentStuff", "this is even more different")); JsonObject jo = builder.build(); JsonObject commonObj = jo.getJsonObject("commonObj"); assertEquals(4, commonObj.getInt("intA")); assertEquals(8d, commonObj.getJsonNumber("doubleA").doubleValue()); assertEquals("this really is other stuff", jo.getString("otherStuff")); JsonArray commonArray = jo.getJsonArray("commonArray"); assertEquals("integration", commonArray.getJsonArray(0).getString(0)); assertEquals(6, commonArray.getJsonArray(0).getInt(1)); assertEquals("demo", commonArray.getJsonArray(1).getString(0)); assertEquals(7, commonArray.getJsonArray(1).getInt(1)); }
static JsonObjectBuilder createMergingJsonObjectBuilder(JsonObjectBuilder delegate) { return new MergingJsonObjectBuilder(delegate); }
MetricsSupport implements Service { static JsonObjectBuilder createMergingJsonObjectBuilder(JsonObjectBuilder delegate) { return new MergingJsonObjectBuilder(delegate); } }
MetricsSupport implements Service { static JsonObjectBuilder createMergingJsonObjectBuilder(JsonObjectBuilder delegate) { return new MergingJsonObjectBuilder(delegate); } private  MetricsSupport(Builder builder); }
MetricsSupport implements Service { static JsonObjectBuilder createMergingJsonObjectBuilder(JsonObjectBuilder delegate) { return new MergingJsonObjectBuilder(delegate); } private  MetricsSupport(Builder builder); static MetricsSupport create(); static MetricsSupport create(Config config); static Builder builder(); static String toPrometheusData(MetricID metricID, Metric metric, boolean withHelpType); static String toPrometheusData(String name, Metric metric, boolean withHelpType); void configureVendorMetrics(String routingName,
            Routing.Rules rules); void configureEndpoint(Routing.Rules rules); @Override void update(Routing.Rules rules); }
MetricsSupport implements Service { static JsonObjectBuilder createMergingJsonObjectBuilder(JsonObjectBuilder delegate) { return new MergingJsonObjectBuilder(delegate); } private  MetricsSupport(Builder builder); static MetricsSupport create(); static MetricsSupport create(Config config); static Builder builder(); static String toPrometheusData(MetricID metricID, Metric metric, boolean withHelpType); static String toPrometheusData(String name, Metric metric, boolean withHelpType); void configureVendorMetrics(String routingName,
            Routing.Rules rules); void configureEndpoint(Routing.Rules rules); @Override void update(Routing.Rules rules);  }