Package railo.runtime.type

Examples of railo.runtime.type.Array


              throw Caster.toPageException(e);
            }
                       
                        //print.ln("encoded:"+encoded);
                        //print.ln("decoded:"+Base64Util.decodeBase64(encoded));
                        Array arr=ListUtil.listToArray(dec,":");
                        if(arr.size()<3) {
                            if(arr.size()==1) setCFLogin(arr.get(1,null),"");
                            else setCFLogin(arr.get(1,null),arr.get(2,null));
                        }
                    }
                   
                }
            }
View Full Code Here


        Query query = (Query)parent;
        if(!item.isNulls() && !item.isValueSet())
            throw new ApplicationException("attribute value from tag queryparam is required if attribute null is false");
        if(list) {
          String v = Caster.toString(item.getValue());
          Array arr=null;
          if(StringUtil.isEmpty(v)){
            arr=new ArrayImpl();
            arr.append("");
          }
          else arr=ListUtil.listToArrayRemoveEmpty(v,separator);
       
        int len=arr.size();
        StringBuffer sb=new StringBuffer();
        for(int i=1;i<=len;i++) {
            query.setParam(item.clone(check(arr.getE(i))));
              if(i>1)sb.append(',');
              sb.append('?');
        }
        write(sb.toString());
        }
View Full Code Here

 
  private static boolean isUSorEuroDateEuro(String str, boolean isEuro) {
    if(StringUtil.isEmpty(str)) return false;
   
    for(int i=0;i<DATE_DEL.length;i++) {
      Array arr = railo.runtime.type.util.ListUtil.listToArrayRemoveEmpty(str,DATE_DEL[i]);
      if(arr.size()!=3) continue;

      int month=Caster.toIntValuearr.get(isEuro?2:1,Constants.INTEGER_0),Integer.MIN_VALUE);
      int day=Caster.toIntValue(    arr.get(isEuro?1:2,Constants.INTEGER_0),Integer.MIN_VALUE);
      int year=Caster.toIntValue(    arr.get(3,Constants.INTEGER_0),Integer.MIN_VALUE);

     
      if(month==Integer.MIN_VALUE) continue;
      if(month>12) continue;
      if(day==Integer.MIN_VALUE) continue;
View Full Code Here

            Component comp=((Component)o);
            return comp.instanceOf(type);
        }
        if(isArrayType(type) && isArray(o)){
          String t=type.substring(0,type.length()-2);
          Array arr = Caster.toArray(o,null);
          if(arr!=null){
            Iterator<Object> it = arr.valueIterator();
            while(it.hasNext()){
              if(!isCastableTo(t, it.next(), alsoAlias,alsoPattern,-1))
                return false;
             
            }
View Full Code Here

            return comp.instanceOf(strType);
        }
        if(isArrayType(strType) && isArray(o)){
          String _strType=strType.substring(0,strType.length()-2);
          short _type=CFTypes.toShort(_strType, false, (short)-1);
          Array arr = Caster.toArray(o,null);
          if(arr!=null){
            Iterator<Object> it = arr.valueIterator();
            while(it.hasNext()){
              Object obj = it.next();
              if(!isCastableTo(_type,_strType, obj))
                return false;
            }
View Full Code Here

   * @param count count of arguments for the constructor
   * @return returns the constructors
   */
  public synchronized Constructor[] getConstructors(Class clazz,int count) {
    Object o=map.get(clazz);
    Array con;
    if(o==null) {
      con=store(clazz);
    }
    else con=(Array) o;

    o=con.get(count+1,null);
    if(o==null) return null;
    return (Constructor[]) o;
  }
View Full Code Here

   * @param clazz
   * @return stored structure
   */
  private Array store(Class clazz) {
      Constructor[] conArr=clazz.getConstructors();
      Array args=new ArrayImpl();
      for(int i=0;i<conArr.length;i++) {
        storeArgs(conArr[i],args);
      }
      map.put(clazz,args);
      return args;
View Full Code Here

    if(methodsMap==null)
      methodsMap=store(clazz);
   
    Object o = methodsMap.get(methodName,null);
    if(o==null) return null;
    Array methods=(Array) o;
    o=methods.get(count+1,null);
    if(o==null) return null;
    return (Method[]) o;
  }
View Full Code Here

  private void storeMethod(Method method, StructImpl methodsMap) {
    Key methodName = KeyImpl.init(method.getName());
   
   
    Object o=methodsMap.get(methodName,null);
    Array methodArgs;
    if(o==null) {
      methodArgs=new ArrayImpl();
      methodsMap.setEL(methodName,methodArgs);
    }
    else methodArgs=(Array) o;
View Full Code Here

     
  }

    private static void loadImplements(PageContext pc,PageSource child, String lstExtend,List interfaces, Map interfaceUdfs) throws PageException {
     
      Array arr = railo.runtime.type.util.ListUtil.listToArrayRemoveEmpty(lstExtend, ',');
      Iterator<Object> it = arr.valueIterator();
      InterfaceImpl ic;
      String extend;

      while(it.hasNext()) {
        extend=((String) it.next()).trim();
View Full Code Here

TOP

Related Classes of railo.runtime.type.Array

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.