/** * Create the {@link SpringELExpression}. * <p><strong>Note:</strong> as of 2.4.8, this method is not invoked when a * {@link SimpleParserContext} is passed in, which is mainly the case when using * SpEL for data binding. In those scenarios, the configuration options are * limited to the use of property accessors and a ConversionService. */ protected SpringELExpression createSpringELExpression(Map<String, Expression> expressionVars, org.springframework.expression.Expression spelExpression, Class<?> expectedResultType, org.springframework.core.convert.ConversionService conversionService) { return new SpringELExpression(spelExpression, expressionVars, expectedResultType, conversionService, propertyAccessors); }
/** * Create the {@link SpringELExpression}. * <p><strong>Note:</strong> as of 2.4.8, this method is not invoked when a * {@link SimpleParserContext} is passed in, which is mainly the case when using * SpEL for data binding. In those scenarios, the configuration options are * limited to the use of property accessors and a ConversionService. */ protected SpringELExpression createSpringELExpression(Map<String, Expression> expressionVars, org.springframework.expression.Expression spelExpression, Class<?> expectedResultType, org.springframework.core.convert.ConversionService conversionService) { return new SpringELExpression(spelExpression, expressionVars, expectedResultType, conversionService, propertyAccessors); }
public Expression parseExpression(String expression, ParserContext context) throws ParserException { Assert.hasText(expression, "The expression string to parse is required and must not be empty"); context = (context == null) ? NullParserContext.INSTANCE : context; Map<String, Expression> expressionVars = parseSpelExpressionVariables(context.getExpressionVariables()); org.springframework.expression.Expression spelExpression = parseSpelExpression(expression, context); Class<?> expectedResultType = context.getExpectedEvaluationResultType(); org.springframework.core.convert.ConversionService cs = conversionService.getDelegateConversionService(); return context instanceof SimpleParserContext ? new SpringELExpression(spelExpression, expectedResultType, simpleContextFactory) : createSpringELExpression(expressionVars, spelExpression, expectedResultType, cs); }
public Expression parseExpression(String expression, ParserContext context) throws ParserException { Assert.hasText(expression, "The expression string to parse is required and must not be empty"); context = (context == null) ? NullParserContext.INSTANCE : context; Map<String, Expression> expressionVars = parseSpelExpressionVariables(context.getExpressionVariables()); org.springframework.expression.Expression spelExpression = parseSpelExpression(expression, context); Class<?> expectedResultType = context.getExpectedEvaluationResultType(); org.springframework.core.convert.ConversionService cs = conversionService.getDelegateConversionService(); return context instanceof SimpleParserContext ? new SpringELExpression(spelExpression, expectedResultType, simpleContextFactory) : createSpringELExpression(expressionVars, spelExpression, expectedResultType, cs); }