Package com.googlecode.aviator.exception

Examples of com.googlecode.aviator.exception.ExpressionRuntimeException


*/
public class AviatorMethod extends AviatorObject {

    @Override
    public int compare(AviatorObject other, Map<String, Object> env) {
        throw new ExpressionRuntimeException("Could not compare method with " + other.desc(env));
    }
View Full Code Here


    public AviatorObject invoke(Map<String, Object> env, List<AviatorObject> list) {
        if (cachedFunction == null) {
            cachedFunction = (AviatorFunction) env.get(this.methodName);
        }
        if (cachedFunction == null) {
            throw new ExpressionRuntimeException("Could not find method named " + methodName);
        }
        final AviatorObject result = cachedFunction.call(env, list.toArray(new AviatorObject[list.size()]));
        return result == null ? AviatorNil.NIL : result;
    }
View Full Code Here

            throw new IllegalArgumentException("reduce(seq,fun,init)");
        }
        Object first = args[0].getValue(env);
        AviatorFunction fun = FunctionUtils.getFunction(1, args, env, 2);
        if (fun == null) {
            throw new ExpressionRuntimeException("There is no function named " + ((AviatorJavaType) args[1]).getName());
        }
        if (first == null) {
            throw new NullPointerException("null seq");
        }
        AviatorObject result = args[2];
View Full Code Here

            throw new IllegalArgumentException("map(seq,fun)");
        }
        Object first = args[0].getValue(env);
        AviatorFunction fun = FunctionUtils.getFunction(1, args, env, 1);
        if (fun == null) {
            throw new ExpressionRuntimeException("There is no function named " + ((AviatorJavaType) args[1]).getName());
        }
        if (first == null) {
            throw new NullPointerException("null seq");
        }
        Class<?> clazz = first.getClass();
View Full Code Here

TOP

Related Classes of com.googlecode.aviator.exception.ExpressionRuntimeException

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.