Package railo.transformer.bytecode.expression

Examples of railo.transformer.bytecode.expression.ExprString


         
          Function.throwIfNotEmpty(t);
          Attribute attr = t.getAttribute("access");
         
          if(attr!=null) {
            ExprString expr = CastString.toExprString(attr.getValue());
           
            if(!(expr instanceof LitString))
              throw new EvaluatorException(
            "the attribute access of the Tag function inside an interface must contain a constant value");
            String access = ((LitString)expr).getString().trim();
View Full Code Here


      Member member=(members.get(i));
      boolean last=(i+1)==count;
     
      // Data Member
      if(member instanceof DataMember)  {
        ExprString name = ((DataMember)member).getName();
        if(last && ASMUtil.isDotKey(name)){
          LitString ls = (LitString)name;
          if(ls.getString().equalsIgnoreCase("RECORDCOUNT")){
            adapter.invokeStatic(VARIABLE_UTIL_IMPL, RECORDCOUNT);
          }
View Full Code Here

      GeneratorAdapter adapter = bc.getAdapter();
      if(startIndex!=null)startIndex.setValue(doOnlyScope?0:1);
   
      // this
      if(scope==Scope.SCOPE_UNDEFINED) {
        ExprString name = member.getName();
        if(ASMUtil.isDotKey(name)){
          LitString ls = (LitString)name;
        if(ls.getString().equalsIgnoreCase("THIS")){
          if(startIndex!=null)startIndex.setValue(1);
          adapter.loadArg(0);
View Full Code Here

     * @see railo.transformer.bytecode.Statement#_writeOut(org.objectweb.asm.commons.GeneratorAdapter)
     */
    public void _writeOut(BytecodeContext bc) throws BytecodeException {
      GeneratorAdapter adapter = bc.getAdapter();
        adapter.loadArg(0);
        ExprString es=CastString.toExprString(expr);
        boolean usedExternalizer=false;
       
        /*if(es instanceof LitString) {
          LitString ls = ((LitString)es);
          ls.setExternalize(true);
        }*/
       
        if(!usedExternalizer)es.writeOut(bc,Expression.MODE_REF);
        adapter.invokeVirtual(Types.PAGE_CONTEXT,checkPSQ?METHOD_WRITE_PSQ:METHOD_WRITE);
    }
View Full Code Here

    this.passByReference=passByReference;
    this.meta=meta;
  }

  private LitString litString(Expression expr, LitString defaultValue) {
    ExprString str = CastString.toExprString(expr);
    if(str instanceof LitString) return (LitString) str;
    return defaultValue;
  }
View Full Code Here

       
    }
    // attribute modifier
    Attribute attrModifier = tag.getAttribute("modifier");
    if(attrModifier!=null) {
      ExprString expr = CastString.toExprString(attrModifier.getValue());
      if(!(expr instanceof Literal))
        throw new EvaluatorException("Attribute modifier of the Tag Function, must be one of the following literal string values: [abstract] or [final]");
      String modifier=StringUtil.emptyIfNull(((Literal)expr).getString()).trim();
      if(!StringUtil.isEmpty(modifier) && !"abstract".equalsIgnoreCase(modifier) && !"final".equalsIgnoreCase(modifier))
        throw new EvaluatorException("Attribute modifier of the Tag Function, must be one of the following literal string values: [abstract] or [final]");
View Full Code Here

      checkDefaultValue(tag);
       
      // check attribute passby
      Attribute attrPassBy = tag.getAttribute("passby");
      if(attrPassBy!=null) {
        ExprString expr = CastString.toExprString(attrPassBy.getValue());
        if(!(expr instanceof LitString))
          throw new EvaluatorException("Attribute passby of the Tag Argument, must be a literal string");
        LitString lit = (LitString)expr;
        String passBy = lit.getString().toLowerCase().trim();
        if(!"value".equals(passBy) && !"ref".equals(passBy) && !"reference".equals(passBy))
View Full Code Here

    }

  public static void checkDefaultValue(Tag tag) {
    Attribute _type = tag.getAttribute("type");
    if(_type!=null) {
      ExprString typeValue = CastString.toExprString(_type.getValue());
      if(typeValue instanceof LitString) {
        String strType=((LitString)typeValue).getString();
        Attribute _default = tag.getAttribute("default");
        if(_default!=null) {
          Expression defaultValue = _default.getValue();
View Full Code Here

      // &=
      if (data.cfml.isCurrent('=') && expr instanceof Variable) {
        data.cfml.next();
        comments(data);
        Expression right = assignOp(data);
        ExprString res = OpString.toExprString(expr, right);
        expr=new OpVariable((Variable)expr,res);
      }
      else {
              comments(data);
              expr=OpString.toExprString(expr, plusMinusOp(data));
View Full Code Here

          Expression inner=assignOp(data);
                    comments(data);
          if (!data.cfml.isCurrent('#'))
            throw new TemplateException(data.cfml,"Invalid Syntax Closing [#] not found");
         
          ExprString exprStr=null;
          if(str.length()!=0) {
            exprStr=new LitString(str.toString(),line,data.cfml.getPosition());
            if(expr!=null){
              expr = OpString.toExprString(expr, exprStr);
            }
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.expression.ExprString

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.