Examples of ElException


Examples of org.nutz.el.ElException

        case '9':
          sb.append(exp.poll());
          break;
        case '.':
          if(hasPoint){
            throw new ElException("表达式错误,请查看是否有多个'.'!");
          }
          hasPoint = true;
          sb.append(exp.poll());
          break;
        case 'l':
View Full Code Here

Examples of org.nutz.el.ElException

      switch(exp.peek()){
      case '=':
        exp.poll();
        return new EQOpt();
      }
      throw new ElException("表达式错误,请检查'='后是否有非法字符!");
    case '!':
      exp.poll();
      switch(exp.peek()){
      case '=':
        exp.poll();
View Full Code Here

Examples of org.nutz.el.ElException

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

Examples of org.nutz.el.ElException

  }
  public Object calculate() {
    if(left instanceof Operator){
      return ((Operator) left).calculate();
    }
    throw new ElException("三元表达式错误!");
  }
View Full Code Here

Examples of org.nutz.el.ElException

  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

Examples of org.nutz.el.ElException

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

Examples of org.nutz.el.ElException

  }
 
  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

Examples of org.nutz.el.ElException

    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

Examples of org.nutz.el.ElException

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

Examples of org.nutz.el.ElException

 
  public void wrap(Queue<Object> obj) {
    throw new ElException("'('符号不能进行wrap操作!");
  }
  public Object calculate() {
    throw new ElException("'('符号不能进行计算操作!");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.