Package org.springframework.expression.spel.support

Examples of org.springframework.expression.spel.support.StandardTypeConverter


         sec.addPropertyAccessor(new MapAccessor());
         sec.setBeanResolver(new BeanFactoryResolver(beanEvaluationContext.getBeanFactory()));
         sec.setTypeLocator(new StandardTypeLocator(beanEvaluationContext.getBeanFactory().getBeanClassLoader()));
         ConversionService conversionService = beanEvaluationContext.getBeanFactory().getConversionService();
         if (conversionService != null) {
            sec.setTypeConverter(new StandardTypeConverter(conversionService));
         }

         _evaluationContext = sec;
      }
View Full Code Here


        Validate.notNull(beanFactory, "Bean factory cannot be null");
        // ConversionService CAN be null

        this.setBeanResolver(new BeanFactoryResolver(beanFactory));
        if (conversionService != null) {
            this.setTypeConverter(new StandardTypeConverter(conversionService));
        }

        this.addPropertyAccessor(VariablesMapPropertyAccessor.INSTANCE);
        this.addPropertyAccessor(BeansPropertyAccessor.INSTANCE);
        this.addPropertyAccessor(MAP_ACCESSOR_INSTANCE);
View Full Code Here

        Validate.notNull(beanFactory, "Bean factory cannot be null");
        // ConversionService CAN be null

        this.setBeanResolver(new BeanFactoryResolver(beanFactory));
        if (conversionService != null) {
            this.setTypeConverter(new StandardTypeConverter(conversionService));
        }

        this.addPropertyAccessor(VariablesMapPropertyAccessor.INSTANCE);
        this.addPropertyAccessor(BeansPropertyAccessor.INSTANCE);
        this.addPropertyAccessor(MAP_ACCESSOR_INSTANCE);
View Full Code Here

  private static StandardEvaluationContext createStandardEvaluationContext(ConversionService conversionService,
      BeanFactory beanFactory) {
    StandardEvaluationContext evaluationContext = new StandardEvaluationContext();
    evaluationContext.addPropertyAccessor(new MapAccessor());
    if (conversionService != null) {
      evaluationContext.setTypeConverter(new StandardTypeConverter(conversionService));
    }
    if (beanFactory != null) {
      evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
    }
    return evaluationContext;
View Full Code Here

        sec.addPropertyAccessor(new EnvironmentAccessor());
        sec.setBeanResolver(new BeanFactoryResolver(evalContext.getBeanFactory()));
        sec.setTypeLocator(new StandardTypeLocator(evalContext.getBeanFactory().getBeanClassLoader()));
        ConversionService conversionService = evalContext.getBeanFactory().getConversionService();
        if (conversionService != null) {
          sec.setTypeConverter(new StandardTypeConverter(conversionService));
        }
        customizeEvaluationContext(sec);
        this.evaluationCache.put(evalContext, sec);
      }
      return expr.getValue(sec);
View Full Code Here

        sec.addPropertyAccessor(new EnvironmentAccessor());
        sec.setBeanResolver(new BeanFactoryResolver(evalContext.getBeanFactory()));
        sec.setTypeLocator(new StandardTypeLocator(evalContext.getBeanFactory().getBeanClassLoader()));
        ConversionService conversionService = evalContext.getBeanFactory().getConversionService();
        if (conversionService != null) {
          sec.setTypeConverter(new StandardTypeConverter(conversionService));
        }
        customizeEvaluationContext(sec);
        this.evaluationCache.put(evalContext, sec);
      }
      return expr.getValue(sec);
View Full Code Here

    context.addPropertyAccessor(new MapAccessor());
    context.addPropertyAccessor(new EnvironmentAccessor());
    context.setBeanResolver(new BeanFactoryResolver(getRequestContext().getWebApplicationContext()));
    ConversionService conversionService = getConversionService(pageContext);
    if (conversionService != null) {
      context.setTypeConverter(new StandardTypeConverter(conversionService));
    }
    return context;
  }
View Full Code Here

   * Create a new Spring EL evaluation context for the given rootObject.
   */
  private StandardEvaluationContext createEvaluationContext(Object rootObject) {
    StandardEvaluationContext context = new StandardEvaluationContext(rootObject);
    context.setVariables(getVariableValues(rootObject));
    context.setTypeConverter(new StandardTypeConverter(conversionService));
    context.getPropertyAccessors().addAll(propertyAccessors);
    extendEvaluationContext(context);
    return context;
  }
View Full Code Here

    context.addPropertyAccessor(new MapAccessor());
    context.addPropertyAccessor(new EnvironmentAccessor());
    context.setBeanResolver(new BeanFactoryResolver(getRequestContext().getWebApplicationContext()));
    ConversionService conversionService = getConversionService(pageContext);
    if (conversionService != null) {
      context.setTypeConverter(new StandardTypeConverter(conversionService));
    }
    return context;
  }
View Full Code Here

        sec.addPropertyAccessor(new EnvironmentAccessor());
        sec.setBeanResolver(new BeanFactoryResolver(evalContext.getBeanFactory()));
        sec.setTypeLocator(new StandardTypeLocator(evalContext.getBeanFactory().getBeanClassLoader()));
        ConversionService conversionService = evalContext.getBeanFactory().getConversionService();
        if (conversionService != null) {
          sec.setTypeConverter(new StandardTypeConverter(conversionService));
        }
        customizeEvaluationContext(sec);
        this.evaluationCache.put(evalContext, sec);
      }
      return expr.getValue(sec);
View Full Code Here

TOP

Related Classes of org.springframework.expression.spel.support.StandardTypeConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.