Package railo.transformer.library.function

Examples of railo.transformer.library.function.FunctionLibFunction


      Struct sct=new StructImpl();
      //synchronized(sct) {
        //hasSet=true;
      FunctionLib[] flds;
      flds = ((ConfigImpl)pc.getConfig()).getFLDs();
      FunctionLibFunction func;
      for(int i=0;i<flds.length;i++) {
        Map functions = flds[i].getFunctions();
        Iterator it = functions.keySet().iterator();
       
        while(it.hasNext()){
          Object n=it.next();
          func = flds[i].getFunction(n.toString());
          if(func.getStatus()!=TagLib.STATUS_HIDDEN && func.getStatus()!=TagLib.STATUS_UNIMPLEMENTED)
            sct.set(n.toString(),"");
        }
      }
      functions=sct;
      //}
View Full Code Here


  public static Struct call(PageContext pc , String strFunctionName) throws PageException {
    FunctionLib[] flds;
    flds = ((ConfigImpl)pc.getConfig()).getFLDs();

   
    FunctionLibFunction function=null;
    for(int i=0;i<flds.length;i++) {
      function = flds[i].getFunction(strFunctionName.toLowerCase());
      if(function!=null)break;
    }
    if(function == null) throw new ExpressionException("function ["+strFunctionName+"] is not a built in function");

        //sct.set("returnTypeClass",_class(function.getCazz()));
        //sct.set("class",__class(function.getCazz()));
       
   
   
    // CFML Based Function
    Class clazz=null;
    try{
      clazz=function.getClazz();
    }
    catch(Throwable t){}
    if(clazz==railo.runtime.functions.system.CFFunction.class){
      return cfmlBasedFunction(pc,function);
    }
View Full Code Here

   
  private static String getFunctionInfo(PageContext pc,String functionName) {
    FunctionLib[] flds;
    flds = ((ConfigImpl)pc.getConfig()).getFLDs();
       
    FunctionLibFunction function=null;
    for(int i=0;i<flds.length;i++) {
      function = flds[i].getFunction(functionName.toLowerCase());
      if(function!=null)break;
    }
    if(function == null) return "";
   
    StringBuffer rtn=new StringBuffer();
    rtn.append(function.getName()+"(");
   
   
    int optionals=0;
    ArrayList args = function.getArg();
    for(int i=0;i<args.size();i++) {
      FunctionLibFunctionArg arg=(FunctionLibFunctionArg) args.get(i);
      if(i!=0)rtn.append(", ");
      if(!arg.getRequired()) {
        rtn.append("[");
        optionals++;
      }
      rtn.append(arg.getName());
      rtn.append(":");
      rtn.append(arg.getTypeAsString());
    }
    for(int i=0;i<optionals;i++)
      rtn.append("]");
    rtn.append("):"+function.getReturnTypeAsString());
   
    return rtn.toString();
  }
View Full Code Here

TOP

Related Classes of railo.transformer.library.function.FunctionLibFunction

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.