Package railo.transformer.bytecode.expression.var

Examples of railo.transformer.bytecode.expression.var.BIF


    else if(val instanceof Variable) {
      Variable var=(Variable)val;
      if(var.getMembers().size()==1) {
        Member first = var.getFirstMember();
        if(first instanceof BIF) {
          BIF bif=(BIF) first;
          if("createTimeSpan".equalsIgnoreCase(bif.getFlf().getName())) {
            Argument[] args = bif.getArguments();
            int len=ArrayUtil.size(args);
            if(len>=4 && len<=5) {
              double days=toDouble(args[0].getValue());
              double hours=toDouble(args[1].getValue());
              double minutes=toDouble(args[2].getValue());
View Full Code Here


         
          if(expr instanceof Variable) {
            // do not preserve BIF PreserveSingleQuotes return value
            Member member = ((Variable)expr).getFirstMember();
            if(member instanceof BIF) {
              BIF bif=(BIF) member;

              if(bif.getClazz().getName().equals(PreserveSingleQuotes.class.getName())) {
                printOut.setExpr(bif.getArguments()[0].getValue());
                continue;
              }
              else if(bif.getClazz().getName().equals(ListQualify.class.getName())) {
                Argument[] args = bif.getArguments();
                List<Argument> arr=new ArrayList<Argument>();
               
                // first get existing arguments
                arr.add(args[0]);
                arr.add(args[1]);
                if(args.length>=3)arr.add(args[2]);
                else arr.add(new Argument(LitString.toExprString(","),"string"));
                if(args.length>=4)arr.add(args[3]);
                else arr.add(new Argument(LitString.toExprString("all"),"string"));
                if(args.length>=5)arr.add(args[4]);
                else arr.add(new Argument(LitBoolean.toExprBoolean(false),"boolean"));
               
               
                // PSQ-BIF DO NOT REMOVE THIS COMMENT
                arr.add(new Argument(LitBoolean.toExprBoolean(true),"boolean"));
                bif.setArguments(arr.toArray(new Argument[arr.size()]));
                continue;
              }
              else if(
                bif.getClazz().getName().equals(QuotedValueList.class.getName()) ||
                bif.getClazz().getName().equals(ValueList.class.getName())
                ) {
                //printOut.setPreserveSingleQuote(false);
                continue;
              }
            }
View Full Code Here

 
  private Expression json(ExprData data,FunctionLibFunction flf, char start, char end) throws TemplateException {
    if(!data.cfml.forwardIfCurrent(start))return null;
   
    Position line = data.cfml.getPosition();
    BIF bif=new BIF(flf.getName(),flf);
    bif.setArgType(flf.getArgType());
    bif.setClass(flf.getClazz());
    bif.setReturnType(flf.getReturnTypeAsString());
   
    do {
      comments(data);
      if (data.cfml.isCurrent(end))break;
     
      bif.addArgument(functionArgument(data,data.settings.dotNotationUpper));
      comments(data);
    }
    while (data.cfml.forwardIfCurrent(','));
    comments(data);
     
View Full Code Here

      }
    }
    // Element Function
    FunctionMember fm;
    if(checkLibrary) {
      BIF bif=new BIF(name,flf);
      bif.setArgType(flf.getArgType());
      bif.setClass(flf.getClazz());
      bif.setReturnType(flf.getReturnTypeAsString());
      fm=bif;
     
      if(flf.getArgType()== FunctionLibFunction.ARG_DYNAMIC && flf.hasDefaultValues()){
            ArrayList<FunctionLibFunctionArg> args = flf.getArg();
        Iterator<FunctionLibFunctionArg> it = args.iterator();
            FunctionLibFunctionArg arg;
            while(it.hasNext()){
              arg=it.next();
              if(arg.getDefaultValue()!=null)
                bif.addArgument(
                    new NamedArgument(
                        LitString.toExprString(arg.getName()),
                        LitString.toExprString(arg.getDefaultValue()),
                        arg.getTypeAsString(),false
                        ));
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.expression.var.BIF

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.