Class ExpressionUtils

java.lang.Object
org.springframework.data.mongodb.util.spel.ExpressionUtils

public final class ExpressionUtils extends Object
Internal utility class for dealing with Expression and potential ones.
Since:
3.3
Author:
Christoph Strobl
  • Constructor Details

    • ExpressionUtils

      public ExpressionUtils()
  • Method Details

    • detectExpression

      @Nullable public static org.springframework.expression.Expression detectExpression(@Nullable String potentialExpression)
      Returns a SpEL Expression if the given String is actually an expression that does not evaluate to a LiteralExpression (indicating that no subsequent evaluation is necessary).
      Parameters:
      potentialExpression - can be null
      Returns:
      can be null.
    • evaluate

      @Nullable public static Object evaluate(String value, Supplier<org.springframework.expression.EvaluationContext> evaluationContext)