Class BroadleafExpressionParserImpl
java.lang.Object
org.broadleafcommerce.common.expression.BroadleafExpressionParserImpl
- All Implemented Interfaces:
BroadleafExpressionParser
@Component("blExpressionParser")
public class BroadleafExpressionParserImpl
extends Object
implements BroadleafExpressionParser
- Author:
- Nick Crum ncrum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.expression.ExpressionParser
protected final List<org.springframework.expression.PropertyAccessor>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.expression.spel.support.StandardEvaluationContext
createStandardEvaluationContext
(Map<String, Object> context) protected org.springframework.expression.ExpressionParser
protected org.springframework.expression.ParserContext
protected List<org.springframework.expression.PropertyAccessor>
parseExpression
(String expressionString, Map<String, Object> context) Parses the given expression string with the given context and returns the parsed result string.<T> T
Parses the given expression string with the given context and returns the parsed result with the target type.
-
Field Details
-
parser
protected final org.springframework.expression.ExpressionParser parser -
propertyAccessors
-
-
Constructor Details
-
BroadleafExpressionParserImpl
public BroadleafExpressionParserImpl()
-
-
Method Details
-
parseExpression
Description copied from interface:BroadleafExpressionParser
Parses the given expression string with the given context and returns the parsed result string.- Specified by:
parseExpression
in interfaceBroadleafExpressionParser
- Parameters:
expressionString
- the expression stringcontext
- the context- Returns:
- the parsed expression result
-
parseExpression
public <T> T parseExpression(String expressionString, Map<String, Object> context, Class<T> targetType) Description copied from interface:BroadleafExpressionParser
Parses the given expression string with the given context and returns the parsed result with the target type.- Specified by:
parseExpression
in interfaceBroadleafExpressionParser
- Type Parameters:
T
- the generic type of the result- Parameters:
expressionString
- the expression stringcontext
- the contexttargetType
- the target type for the result- Returns:
- the parsed expression result
-
getParserContext
protected org.springframework.expression.ParserContext getParserContext() -
getPropertyAccessors
-
createStandardEvaluationContext
-
getExpressionParser
protected org.springframework.expression.ExpressionParser getExpressionParser()- Returns:
- the current expression parser
-