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() . These examples are extracted from open source projects. 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
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
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
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
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);
}