Package org.springframework.expression

Examples of org.springframework.expression.EvaluationException


    public WhitelistTypeLocator() {
    }

    public Class<?> findType(String typeName) throws EvaluationException {
        if (notInWhitelist(typeName)) {
            throw new EvaluationException("Forbidden type: " + typeName);
        }
        return standardTypeLocator.findType(typeName);
    }
View Full Code Here


    return TypeDescriptor.valueOf(String.class);
  }

  @Override
  public void setValue(EvaluationContext context, Object value) throws EvaluationException {
    throw new EvaluationException(this.literalValue, "Cannot call setValue() on a LiteralExpression");
  }
View Full Code Here

    return false;
  }

  @Override
  public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException {
    throw new EvaluationException(this.literalValue, "Cannot call setValue() on a LiteralExpression");
  }
View Full Code Here

    return false;
  }

  @Override
  public void setValue(Object rootObject, Object value) throws EvaluationException {
    throw new EvaluationException(this.literalValue, "Cannot call setValue() on a LiteralExpression");
  }
View Full Code Here

          value, typedValue.getTypeDescriptor(), TypeDescriptor.valueOf(targetType));
    }
    if (ClassUtils.isAssignableValue(targetType, value)) {
      return (T) value;
    }
    throw new EvaluationException("Cannot convert value '" + value + "' to type '" + targetType.getName() + "'");
  }
View Full Code Here

    return TypeDescriptor.valueOf(String.class);
  }

  @Override
  public void setValue(EvaluationContext context, Object value) throws EvaluationException {
    throw new EvaluationException(this.expressionString, "Cannot call setValue on a composite expression");
  }
View Full Code Here

    return false;
  }

  @Override
  public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException {
    throw new EvaluationException(this.expressionString, "Cannot call setValue on a composite expression");
  }
View Full Code Here

    return false;
  }

  @Override
  public void setValue(Object rootObject, Object value) throws EvaluationException {
    throw new EvaluationException(this.expressionString, "Cannot call setValue on a composite expression");
  }
View Full Code Here

      return (T) value;
    }
    if (context != null) {
      return (T) context.getTypeConverter().convertValue(value, typedValue.getTypeDescriptor(), TypeDescriptor.valueOf(targetType));
    }
    throw new EvaluationException("Cannot convert value '" + value + "' to type '" + targetType.getName() + "'");
  }
View Full Code Here

      return (T) value;
    }
    if (context != null) {
      return (T) context.getTypeConverter().convertValue(value, typedValue.getTypeDescriptor(), TypeDescriptor.valueOf(targetType));
    }
    throw new EvaluationException("Cannot convert value '" + value + "' to type '" + targetType.getName() + "'");
  }
View Full Code Here

TOP

Related Classes of org.springframework.expression.EvaluationException

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.