public interface ExpressionLanguageCompiler
Modifier and Type | Method and Description |
---|---|
AttributeExpression |
compile(String expression)
Compiles the given Attribute Expression string into an
AttributeExpression that can be evaluated
|
AttributeExpression.ResultType |
getResultType(String expression)
Returns the ResultType that will be returned by the given Expression
|
boolean |
isValidExpression(String expression)
Indicates whether or not the given string is a valid Attribute
Expression.
|
String |
validateExpression(String expression,
boolean allowSurroundingCharacters)
Attempts to validate the given expression and returns
null
if the expression is syntactically valid or a String indicating why the
expression is invalid otherwise. |
AttributeExpression compile(String expression) throws IllegalArgumentException
expression
- the Attribute Expression to be compiledIllegalArgumentException
- if the given expression is not validboolean isValidExpression(String expression)
expression
- to validateString validateExpression(String expression, boolean allowSurroundingCharacters)
null
if the expression is syntactically valid or a String indicating why the
expression is invalid otherwise.expression
- to validateallowSurroundingCharacters
- if true
allows characters
to surround the Expression, otherwise the expression must be exactly
equal to a valid Expression. E.g., /${path}
is valid if and
only if allowSurroundingCharacters
is truenull
if the expression is
syntactically correctAttributeExpression.ResultType getResultType(String expression) throws IllegalArgumentException
expression
- the Expression to evaluateIllegalArgumentException
- if the given Expression is not a valid
Expression Language Expression; the message of this Exception will
indicate the problem if the expression is not syntactically valid.Copyright © 2022 Apache NiFi Project. All rights reserved.