- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Charset c =
String charsetName;Charset.forName(charsetName)
Charset.defaultCharset()
ContentType contentType;contentType.getCharset()
- Smart code suggestions by Codota
}
JsonObject xtraInfo = (JsonObject) persisted.computeIfAbsent( "xtraInfo", newKey -> { return JsonObject.create(); });
JsonObject xtraInfo = (JsonObject) persisted.computeIfAbsent( "xtraInfo", newKey -> { return JsonObject.create(); });
/** * Provides the JSON representation of the information. * * @return the json object */ public JsonObject toJsonValue() { JsonObject obj = JsonObject.create(); if (scriptUri != null) { obj.setField("uri", scriptUri.toString()); } if (scriptSource != null) { obj.setField("source", scriptSource); } JsonArray strArray = JsonArray.create(); for (String req : requires) { strArray.append(req); } obj.setField("requires", strArray); strArray = JsonArray.create(); for (String prov : provides) { strArray.append(prov); } obj.setField("provides", strArray); return obj; } }
JsonObject obj = JsonObject.create(); if (scriptUri != null) { obj.setField("uri", scriptUri.toString());