public class DataWeaveExpressionParser extends Object
| Constructor and Description |
|---|
DataWeaveExpressionParser() |
| Modifier and Type | Method and Description |
|---|---|
static Optional<javax.ws.rs.core.MediaType> |
getOutputMediaType(String script) |
static boolean |
isBindingUsed(String script,
String variableName) |
static boolean |
isBodyBindingUsed(Argument argument) |
static String[] |
selectionsFromBinding(String script,
String variableName) |
static String[] |
selectionsFromBinding(String script,
String variableName,
List<String> selections)
The way this method works is by getting the AST from DW to navigate through the tree, looking for the usages of the binding
and it's fields.
|
public static boolean isBodyBindingUsed(Argument argument)
public static String[] selectionsFromBinding(String script, String variableName)
public static String[] selectionsFromBinding(String script, String variableName, List<String> selections)
DocumentNode
NullSafeNode
BinaryOpNode(ValueSelector)
VariableReferenceNode(parameters)
NameIdentifier(parameters)
NameNode
StringNode(someParameter)
script - to generate the AST fromvariableName - root binding to look for its fields accessingCopyright © 2023. All rights reserved.