Package software.amazon.smithy.jmespath
Class JmespathExpression
java.lang.Object
software.amazon.smithy.jmespath.JmespathExpression
- Direct Known Subclasses:
BinaryExpression
,CurrentExpression
,ExpressionTypeExpression
,FieldExpression
,FlattenExpression
,FunctionExpression
,IndexExpression
,LiteralExpression
,MultiSelectHashExpression
,MultiSelectListExpression
,NotExpression
,SliceExpression
Represents a JMESPath AST node.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract <T> T
accept
(ExpressionVisitor<T> visitor) Visits a node using a double-dispatch visitor.final int
Get the approximate column where the node was defined.final int
getLine()
Get the approximate line where the node was defined.lint()
Lint the expression using static analysis using "any" as the current node.lint
(LiteralExpression currentNode) Lint the expression using static analysis.static JmespathExpression
Parse a JMESPath expression.
-
Constructor Details
-
JmespathExpression
protected JmespathExpression(int line, int column)
-
-
Method Details
-
parse
Parse a JMESPath expression.- Parameters:
text
- Expression to parse.- Returns:
- Returns the parsed expression.
- Throws:
JmespathException
- if the expression is invalid.
-
getLine
public final int getLine()Get the approximate line where the node was defined.- Returns:
- Returns the line.
-
getColumn
public final int getColumn()Get the approximate column where the node was defined.- Returns:
- Returns the column.
-
accept
Visits a node using a double-dispatch visitor.- Type Parameters:
T
- Type of value the visitor returns.- Parameters:
visitor
- Visitor to accept on the node.- Returns:
- Returns the result of applying the visitor.
-
lint
Lint the expression using static analysis using "any" as the current node.- Returns:
- Returns the linter result.
-
lint
Lint the expression using static analysis.- Parameters:
currentNode
- The value to set as the current node.- Returns:
- Returns the problems that were detected.
-