Package railo.runtime.interpreter

Examples of railo.runtime.interpreter.CFMLExpressionInterpreter


    return new CollectionIterator(keys(),this);
  }

  public void readExternal(ObjectInput in) throws IOException {
    try {
      QueryImpl other=(QueryImpl) new CFMLExpressionInterpreter().interpret(ThreadLocalPageContext.get(),in.readUTF());
      this.arrCurrentRow=other.arrCurrentRow;
      this.columncount=other.columncount;
      this.columnNames=other.columnNames;
      this.columns=other.columns;
      this.exeTime=other.exeTime;
View Full Code Here


    }
  }

  private void readExternalOldStyle(PageContext pc, String str) throws IOException {
    try {
      ComponentImpl other=(ComponentImpl) new CFMLExpressionInterpreter().interpret(pc,str);
      _readExternal(other);
    }
    catch (PageException e) {
      throw ExceptionUtil.toIOException(e);
    }
View Full Code Here

    return manager;
  }

  @Override
  public Object evaluate(String expression) throws PageException {
    return new CFMLExpressionInterpreter().interpret(this,expression);
  }
View Full Code Here

            int format = UDFUtil.toReturnFormat(strArgCollFormat,-1);
           
              // CFML
              if(UDF.RETURN_FORMAT_SERIALIZE==format)  {
                 // do not catch exception when format is defined
                args=new CFMLExpressionInterpreter().interpret(pc, str);
              }
              // JSON
              if(UDF.RETURN_FORMAT_JSON==format)  {
                 // do not catch exception when format is defined
                args=new JSONExpressionInterpreter(false).interpret(pc, str);
              }
              // default
              else {
                 // catch exception when format is not defined, then in this case the string can also be a simple argument
                try {
                  args=new JSONExpressionInterpreter(false).interpret(pc, str);
                }
                catch (PageException pe) {
                  try {
                    args=new CFMLExpressionInterpreter().interpret(pc, str);
                  }
                  catch (PageException _pe) {}
            }
              }
        }
View Full Code Here

     
      //PageContext pc = ThreadLocalPageContext.get();
      Property p;
      Object v;
      Collection.Key k;
    CFMLExpressionInterpreter interpreter = new CFMLExpressionInterpreter();
      for(int i=0;i<props.length;i++){
        p=props[i];
        k=Caster.toKey(p.getName());
      // value
        v=scope.get(k,null);
        if(v==null)v=comp.get(k, null);
      // default
       
        if(v!=null)v=Caster.castTo(pc, p.getType(), v, false);
        else{
          if(!StringUtil.isEmpty(p.getDefault())){
            try {
              v=Caster.castTo(pc, p.getType(), p.getDefault(), false);
             
            }
              catch(PageException pe) {
                try {
                  v=interpreter.interpret(pc, p.getDefault());
                  v=Caster.castTo(pc, p.getType(), v, false);
                }
                  catch(PageException pe2) {
                  throw new ExpressionException("can not use default value ["+p.getDefault()+"] for property ["+p.getName()+"] with type ["+p.getType()+"]");
                  }
View Full Code Here

        }
        catch(PageException pe){}
      break;
      case UDF.RETURN_FORMAT_SERIALIZE:
        try{
          return new CFMLExpressionInterpreter().interpret(pc, toString(data,charset));
        }
        catch(PageException pe){}
      break;
      case UDF.RETURN_FORMAT_WDDX:
        try{
View Full Code Here

  private static Object _call(PageContext pc , Object[] objs,int len, boolean preciseMath) throws PageException {
    Object rst=null;
    for(int i=0;i<len;i++) {
      if(objs[i] instanceof Number) rst= objs[i];
      else rst= new CFMLExpressionInterpreter().interpret(pc,Caster.toString(objs[i]), preciseMath);
    }
    return rst;
  }
View Full Code Here

TOP

Related Classes of railo.runtime.interpreter.CFMLExpressionInterpreter

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.