Codota Logo
BeanWrapperExpression
Code IndexAdd Codota to your IDE (free)

How to use
BeanWrapperExpression
in
org.springframework.binding.expression.beanwrapper

Best Java code snippets using org.springframework.binding.expression.beanwrapper.BeanWrapperExpression (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.springframework.webflow/spring-binding

  protected Expression doParseExpression(String expressionString, ParserContext context) throws ParserException {
    BeanWrapperExpression expression = new BeanWrapperExpression(expressionString, conversionService);
    expression.setAutoGrowNestedPaths(autoGrowNestedPaths);
    expression.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    return expression;
  }
}
origin: org.springframework.webflow/spring-binding

public Class<?> getValueType(Object context) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyType(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

  protected Expression doParseExpression(String expressionString, ParserContext context) throws ParserException {
    return new BeanWrapperExpression(expressionString, conversionService);
  }
}
origin: spring-projects/spring-webflow

public Class<?> getValueType(Object context) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyType(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

  protected Expression doParseExpression(String expressionString, ParserContext context) throws ParserException {
    BeanWrapperExpression expression = new BeanWrapperExpression(expressionString, conversionService);
    expression.setAutoGrowNestedPaths(autoGrowNestedPaths);
    expression.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    return expression;
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Class getValueType(Object context) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyType(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "An BeansException occurred getting the value type for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public Object getValue(Object context) throws EvaluationException {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    return beanWrapper.getPropertyValue(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: spring-projects/spring-webflow

public Object getValue(Object context) throws EvaluationException {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    return beanWrapper.getPropertyValue(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public Object getValue(Object context) throws EvaluationException {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    return beanWrapper.getPropertyValue(expression);
  } catch (NotReadablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred getting the value for expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "]", e);
  }
}
origin: org.springframework.webflow/spring-binding

public void setValue(Object context, Object value) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    beanWrapper.setConversionService(conversionService.getDelegateConversionService());
    beanWrapper.setPropertyValue(expression, value);
  } catch (NotWritablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (TypeMismatchException e) {
    throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
origin: spring-projects/spring-webflow

public void setValue(Object context, Object value) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths);
    beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit);
    beanWrapper.setConversionService(conversionService.getDelegateConversionService());
    beanWrapper.setPropertyValue(expression, value);
  } catch (NotWritablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (TypeMismatchException e) {
    throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
origin: org.springframework.webflow/org.springframework.binding

public void setValue(Object context, Object value) {
  try {
    BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context);
    Set converters = conversionService.getConversionExecutors(String.class);
    for (Iterator it = converters.iterator(); it.hasNext();) {
      ConversionExecutor converter = (ConversionExecutor) it.next();
      beanWrapper.registerCustomEditor(converter.getTargetClass(), new PropertyEditorConverter(converter));
    }
    beanWrapper.setPropertyValue(expression, value);
  } catch (NotWritablePropertyException e) {
    throw new PropertyNotFoundException(context.getClass(), expression, e);
  } catch (TypeMismatchException e) {
    throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e);
  } catch (BeansException e) {
    throw new EvaluationException(context.getClass(), getExpressionString(),
        "A BeansException occurred setting the value of expression '" + getExpressionString()
            + "' on context [" + context.getClass() + "] to [" + value + "]", e);
  }
}
org.springframework.binding.expression.beanwrapperBeanWrapperExpression

Javadoc

An expression that delegates to a BeanWrapperImpl to evaluate or set a property of a context. Also supports the configuration of a ConversionService to allow StringToObject type conversion to occur as part of setting a property. The StringToObject ConversionExecutors are automatically adapted and registered as PropertyEditors. Mainly exists to take advantage of BeanWrapper's unique property access features as an Expression implementation, notably the ability to infer types of generic collections and maps and perform type coersion on collection elements when setting values. Note that Spring's BeanWrapper is not a full-blown EL implementation: it only supports property access, and does not support method invocation, arithmetic operations, or logic operations.

Most used methods

  • <init>
    Creates a new bean wrapper expression.
  • getExpressionString
  • setAutoGrowCollectionLimit
    Specify a limit for array and collection auto-growing.Default is unlimited on a plain BeanWrapper.
  • setAutoGrowNestedPaths
    Set whether this BeanWrapper should attempt to "auto-grow" a nested path that contains a null value.

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • BoxLayout (javax.swing)
  • JPanel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now