if (child instanceof LiteralExpression) {
LiteralExpression valueExp = (LiteralExpression) child;
LiteralExpression minValue = args[i].getMinValue();
LiteralExpression maxValue = args[i].getMaxValue();
if (minValue != null && minValue.getDataType().compareTo(minValue.getValue(), valueExp.getValue(), valueExp.getDataType()) > 0) {
throw new ValueRangeExcpetion(minValue, maxValue == null ? "" : maxValue, valueExp.getValue(), info.getName() + " argument " + (i + 1));
}
if (maxValue != null && maxValue.getDataType().compareTo(maxValue.getValue(), valueExp.getValue(), valueExp.getDataType()) < 0) {
throw new ValueRangeExcpetion(minValue == null ? "" : minValue, maxValue, valueExp.getValue(), info.getName() + " argument " + (i + 1));
}
}
}
if (args[i].isConstant() && ! (child instanceof LiteralExpression) ) {
throw new ArgumentTypeMismatchException("constant", child.toString(), info.getName() + " argument " + (i + 1));