Package railo.runtime.interpreter.ref.literal

Examples of railo.runtime.interpreter.ref.literal.LString


      FunctionLibFunctionArg arg;
      if(args.size()<_args.size()){
        Object val;
        ArrayList<Ref> refs=new ArrayList<Ref>();
        arg=_args.get(0);
        refs.add(new Casting(arg.getTypeAsString(),arg.getType(),new LFunctionValue(new LString(arg.getName()),coll)));
        for(int y=1;y<_args.size();y++){
          arg = _args.get(y);
         
          // match by name
          val = args.get(arg.getName(),null);
         
          //match by alias
          if(val==null) {
            String alias=arg.getAlias();
            if(!StringUtil.isEmpty(alias,true)) {
              String[] aliases = railo.runtime.type.util.ListUtil.trimItems(railo.runtime.type.util.ListUtil.listToStringArray(alias,','));
              for(int x=0;x<aliases.length;x++){
                val = args.get(aliases[x],null);
                if(val!=null) break;
              }
            }
          }
         
          if(val==null) {
            if(arg.getRequired()) {
              throw new ExpressionException("missing required argument ["+arg.getName()+"] for member function call ["+member.getMemberName()+"]");
            }
          }
          else{
            refs.add(new Casting(arg.getTypeAsString(),arg.getType(),new LFunctionValue(new LString(arg.getName()),val)));
            //refs.add(new LFunctionValue(new LString(arg.getName()),new Casting(pc,arg.getTypeAsString(),arg.getType(),val)));
          }
         
        }
        return new BIFCall(coll,member, refs.toArray(new Ref[refs.size()])).getValue(pc);
View Full Code Here


                if(!cfml.forwardIfCurrent('.')) break;
                cfml.removeSpace();
            }
            cfml.removeSpace();
            if(str.length()>0 && cfml.charAt(cfml.getPos()-1)!='.')
                return new LString(str.toString());

        throw new InterpreterException("invalid variable name definition");
    }
View Full Code Here

        mode=DYNAMIC;
        return ref;
      }
           
      if(cfml.isAfterLast() && cfml.toString().trim().length()==0)
        return new LString("");
           
        // else Error
      String str=cfml.toString();
      int pos=cfml.getPos();
      if(str.length()>100) {
View Full Code Here

        cfml.removeSpace();
        return LBoolean.FALSE;
      }
      else if(allowNullConstant && name.equalsIgnoreCase("NULL")){
        cfml.removeSpace();
        return new  LString(null);
      }
      else if(name.equalsIgnoreCase("NEW")){
        Ref res = newOp();
        if(res!=null) return res;
     
View Full Code Here

          fullName.append('.');
          fullName.append(name);
              }
        else break;
      }
      refName=new LString(fullName.toString());
    }
    else {
      if(cfml.isCurrentQuoter())refName=string();
      if(refName==null){
        cfml.setPos(start);
View Full Code Here

        return null;
    }
   
    @Override
    public Ref getKey(PageContext pc) throws PageException {
        return new LString(getKeyAsString(pc));
    }
View Full Code Here

  }

    @Override
    public Ref getKey(PageContext pc) throws PageException {
        if(key==null)return refKey;
        return new LString(key);
    }
View Full Code Here

TOP

Related Classes of railo.runtime.interpreter.ref.literal.LString

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.