Package anvil.core

Examples of anvil.core.AnyString


          }
        }
        break;
    }

    return new AnyString(url.toString());
  }
View Full Code Here


  /// @synopsis string getContent()
  public static final Any getContent(Context context)
  {
    OutputStream o = context.getOutputStream();
    if ((o != null) && (o instanceof ByteArrayOutputStream)) {
      return new AnyString(((ByteArrayOutputStream)o).toString());
    } else {
      return Any.NULL;
   
  }
View Full Code Here

  /// <li>import
  /// </ul>
  /// @synopsis string getType()
  public Any m_getType()
  {
    return new AnyString(getTypeAsString());
  }
View Full Code Here

      Enumeration e = ((Scope)_type).getDeclarations();
      Array types = new Array();
      while(e.hasMoreElements()) {
        Type type = (Type)e.nextElement();
        if ((ofType == 0) || (type.getType() == ofType)) {
          types.put(new AnyString(type.getName()), new AnyType(type));
        }
      }
      return types;
    }
    return UNDEFINED;
View Full Code Here

            }
          } else {
            value = UNDEFINED;
          }
          doc = function.getParameterDoc(i);
          list.append(new AnyString(function.getParameterName(i)),
            new AnyTuple(new Any[] {
              required ? Any.TRUE : Any.FALSE,
              value,
              Any.create((doc != null) ? doc.getText() : null),
              Any.create((doc != null) ? doc.getChildText(doc.T_TYPE, null) : null)
            }));
          count++;
          break;
         
        case CompilableFunction.PARAMETER_ARRAY:
        case CompilableFunction.PARAMETER_ANYLIST:
        case CompilableFunction.PARAMETER_LIST:
          doc = function.getParameterDoc(i);
          list.append(DOTDOT, new AnyTuple(new Any[] {
              new AnyString(function.getParameterName(i)),
              Any.create((doc != null) ? doc.getText() : null),
              Any.create((doc != null) ? doc.getChildText(doc.T_TYPE, null) : null)
            }));
          break;
        }
View Full Code Here

  public Any m_getPathinfo()
  {
    Type type = _type;
    while(type != null) {
      if (type instanceof Module) {
        return new AnyString(((Module)type).getPathinfo());
      }
      type = type.getParent();
    }
    return UNDEFINED;
  }
View Full Code Here

      int length = name.length();
      Any key;
      Any any;
      Array array;

      key = new AnyString(name.substring(0, start).trim());
      any = base.get(key);
      if ((any == null) || !any.isArray()) {
        array = new Array();
        base.put(key, array);
      } else {
        array = any.toArray();
      }
      base = array;
     
      do {
        end = name.indexOf(']', start + 1);
        if (end == -1) {
          end = length;
        }
       
        new_start = name.indexOf('[', end+1);

        key = createKey(name.substring(start+1, end).trim());
        if (new_start > 0) {
          any = base.get(key);
          if ((any == null) || !any.isArray()) {
            array = new Array();
            base.put(key, array);
          } else {
            array = any.toArray();
          }
          base = array;
        } else {
          putParameter(base, key, value);
        }
       
        start = new_start;
       
      } while (start>=0 && start<length);
   
    } else {
      putParameter(base, new AnyString(name), value);
    }
  } 
View Full Code Here

TOP

Related Classes of anvil.core.AnyString

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.