Package org.nutz.el

Examples of org.nutz.el.ElException


            return ((Elobj) obj).fetchVal();
        }
        if(obj instanceof Operator){
            return ((Operator) obj).calculate();
        }
        throw new ElException("未知计算类型!" + obj);
       
    }
View Full Code Here


    }
    public Object calculate() {
        Object obj = getLeft();
        if (obj instanceof Boolean)
          return (Boolean)obj;
        throw new ElException("三元表达式错误! --> " + obj);
    }
View Full Code Here

    public int fetchPriority() {
        return 13;
    }
    public Object calculate() {
        if(!(left instanceof QuestionOpt)){
            throw new ElException("三元表达式错误!");
        }
        QuestionOpt qo = (QuestionOpt) left;
        Boolean cval = (Boolean) qo.calculate();
        if(cval){
            return qo.getRight();
View Full Code Here

    public Object calculate() {
        Object rval = calculateItem(this.right);
        if(rval instanceof Boolean){
            return !(Boolean) rval;
        }
        throw new ElException("'!'操作符操作失败!");
    }
View Full Code Here

    }
   
    public Object calculate() {
        Object lval = calculateItem(this.left);
        if(!(lval instanceof Boolean)){
            throw new ElException("操作数类型错误!");
        }
        if(!(Boolean)lval){
            return false;
        }
        Object rval = calculateItem(this.right);
        if(!(rval instanceof Boolean)){
            throw new ElException("操作数类型错误!");
        }
        if(!(Boolean)rval){
            return false;
        }
        return true;
View Full Code Here

        return 12;
    }
    public Object calculate() {
        Object lval = calculateItem(left);
        if(!(lval instanceof Boolean)){
            throw new ElException("操作数类型错误!");
        }
        if((Boolean)lval){
            return true;
        }
        Object rval = calculateItem(right);
        if(!(rval instanceof Boolean)){
            throw new ElException("操作数类型错误!");
        }
        if((Boolean)rval){
            return true;
        }
        return false;
View Full Code Here

    public int fetchPriority() {
        return 100;
    }
   
    public void wrap(Queue<Object> obj) {
        throw new ElException("'('符号不能进行wrap操作!");
    }
View Full Code Here

   
    public void wrap(Queue<Object> obj) {
        throw new ElException("'('符号不能进行wrap操作!");
    }
    public Object calculate() {
        throw new ElException("'('符号不能进行计算操作!");
    }
View Full Code Here

    }
    public String fetchSelf() {
        return ")";
    }
    public void wrap(Queue<Object> obj) {
        throw new ElException("')符号不能进行wrap操作!'");
    }
View Full Code Here

    }
    public void wrap(Queue<Object> obj) {
        throw new ElException("')符号不能进行wrap操作!'");
    }
    public Object calculate() {
        throw new ElException("')'符号不能进行计算操作!");
    }
View Full Code Here

TOP

Related Classes of org.nutz.el.ElException

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.