Skip to content

Commit

Permalink
Polish "Add support for custom expression parsing"
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Oct 28, 2021
1 parent 40d84c2 commit f295c8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Expand Up @@ -75,7 +75,7 @@ protected ParameterNameDiscoverer getParameterNameDiscoverer() {

/**
* Return the {@link Expression} for the specified SpEL value
* <p>Parse the expression if it hasn't been already.
* <p>{@link #parseExpression(String) Parse the expression} if it hasn't been already.
* @param cache the cache to use
* @param elementKey the element on which the expression is defined
* @param expression the expression to parse
Expand All @@ -92,18 +92,20 @@ protected Expression getExpression(Map<ExpressionKey, Expression> cache,
return expr;
}

private ExpressionKey createKey(AnnotatedElementKey elementKey, String expression) {
return new ExpressionKey(elementKey, expression);
}

/**
* Parse the expression
* Parse the specified {@code expression}.
* @param expression the expression to parse
* @since 5.3.13
*/
protected Expression parseExpression(String expression) {
return getParser().parseExpression(expression);
}

private ExpressionKey createKey(AnnotatedElementKey elementKey, String expression) {
return new ExpressionKey(elementKey, expression);
}


/**
* An expression key.
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit f295c8b

Please sign in to comment.