Package org.springmodules.validation.valang

Examples of org.springmodules.validation.valang.ValangException


        Assert.notNull(arguments, "The arguments of a function cannot be null");

        try {
            validateArguments(arguments);
        } catch (Throwable t) {
            throw new ValangException(t, line, column);
        }

        this.arguments = arguments;
        functionTemplate = new FunctionTemplate(line, column);
    }
View Full Code Here


           
            return doEvaluate((BigDecimal) leftValue, (BigDecimal) rightValue);
        } else if (leftValue instanceof Date && rightValue instanceof Date) {
            return doEvaluate((Date) leftValue, (Date) rightValue);
        } else {
            throw new ValangException("The " + operatorSymbol  + " operator only supports two date or two number values!", getLine(), getColumn());
        }
    }
View Full Code Here

    public Object execute(Object target, FunctionCallback functionCallback) {
        try {
            return functionCallback.execute(target);
        } catch (Exception e) {
            throw new ValangException(e, line, column);
        }
    }
View Full Code Here

                Class<?> enumClass = enumValue.getClass();
                convertedEnumValue = (Enum<?>) enumClass.getField(value).get(null);

                return enumValue.equals(convertedEnumValue);
            } catch (Throwable e) {
                throw new ValangException("Field [" + value + "] isn't an enum value on " + enumValue.getClass().getName() + ".",
                                          getLine(), getColumn());
            }
        } else {
            return leftValue.equals(rightValue);
        }
View Full Code Here

        function = resolveDefaultFunction(name, arguments, line, column);
        if (function != null) {
            return function;
        }

        throw new ValangException("Could not find function [" + name + "]", line, column);
    }
View Full Code Here

TOP

Related Classes of org.springmodules.validation.valang.ValangException

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.