Java Code Examples for com.github.javaparser.ast.expr.StringLiteralExpr#setString()
The following examples show how to use
com.github.javaparser.ast.expr.StringLiteralExpr#setString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractResourceGenerator.java From kogito-runtimes with Apache License 2.0 | 5 votes |
private void interpolateStrings(StringLiteralExpr vv) { String s = vv.getValue(); String documentation = process.getMetaData() .getOrDefault("Documentation", processName).toString(); String interpolated = s.replace("$name$", processName) .replace("$id$", processId) .replace("$documentation$", documentation); vv.setString(interpolated); }
Example 2
Source File: AbstractResourceGenerator.java From kogito-runtimes with Apache License 2.0 | 5 votes |
private void interpolateUserTaskStrings(StringLiteralExpr vv, UserTaskModelMetaData userTask) { String s = vv.getValue(); String interpolated = s.replace("$taskname$", userTask.getName().replaceAll("\\s", "_")); vv.setString(interpolated); }
Example 3
Source File: QueryEndpointGenerator.java From kogito-runtimes with Apache License 2.0 | 5 votes |
private void interpolateStrings(StringLiteralExpr vv) { String interpolated = vv.getValue() .replace("$name$", name) .replace("$endpointName$", endpointName) .replace("$queryName$", query.getName()) .replace("$prometheusName$", endpointName); vv.setString(interpolated); }
Example 4
Source File: DMNRestResourceGenerator.java From kogito-runtimes with Apache License 2.0 | 5 votes |
private void interpolateStrings(StringLiteralExpr vv) { String s = vv.getValue(); String documentation = ""; String interpolated = s.replace("$name$", decisionName) .replace("$nameURL$", nameURL) .replace("$id$", decisionId) .replace("$modelName$", dmnModel.getName()) .replace("$modelNamespace$", dmnModel.getNamespace()) .replace("$documentation$", documentation); vv.setString(interpolated); }