Package javassist.compiler.ast

Examples of javassist.compiler.ast.ASTree.accept()


/*  156 */     int type = expr.getArrayType();
/*  157 */     ASTList size = expr.getArraySize();
/*  158 */     ASTList classname = expr.getClassName();
/*  159 */     ASTree init = expr.getInitializer();
/*  160 */     if (init != null) {
/*  161 */       init.accept(this);
/*      */     }
/*  163 */     if (size.length() > 1) {
/*  164 */       atMultiNewArray(type, classname, size);
/*      */     } else {
/*  166 */       ASTree sizeExpr = size.head();
View Full Code Here


/*  163 */     if (size.length() > 1) {
/*  164 */       atMultiNewArray(type, classname, size);
/*      */     } else {
/*  166 */       ASTree sizeExpr = size.head();
/*  167 */       if (sizeExpr != null) {
/*  168 */         sizeExpr.accept(this);
/*      */       }
/*  170 */       this.exprType = type;
/*  171 */       this.arrayDim = 1;
/*  172 */       if (type == 307)
/*  173 */         this.className = resolveClassName(classname);
View Full Code Here

/*  180 */     ASTList list = init;
/*  181 */     while (list != null) {
/*  182 */       ASTree h = list.head();
/*  183 */       list = list.tail();
/*  184 */       if (h != null)
/*  185 */         h.accept(this);
/*      */     }
/*      */   }
/*      */
/*      */   protected void atMultiNewArray(int type, ASTList classname, ASTList size)
/*      */     throws CompileError
View Full Code Here

/*  195 */       ASTree s = size.head();
/*  196 */       if (s == null) {
/*      */         break;
/*      */       }
/*  199 */       count++;
/*  200 */       s.accept(this);
/*      */     }
/*      */
/*  203 */     this.exprType = type;
/*  204 */     this.arrayDim = dim;
/*  205 */     if (type == 307)
View Full Code Here

/*      */       else {
/*  324 */         ASTree left = expr.oprand1();
/*  325 */         ASTree right = expr.oprand2();
/*  326 */         left.accept(this);
/*  327 */         int type1 = this.exprType;
/*  328 */         right.accept(this);
/*  329 */         if (!isConstant(expr, token, left, right)) {
/*  330 */           computeBinExprType(expr, token, type1);
/*      */         }
/*      */       }
/*      */     }
View Full Code Here

/* 215 */             i++;
/*     */           }
/*     */         }
/*     */       }
/*     */       else {
/* 220 */         a.accept(this);
/* 221 */         types[i] = this.exprType;
/* 222 */         dims[i] = this.arrayDim;
/* 223 */         cnames[i] = this.className;
/* 224 */         i++;
/*     */       }
View Full Code Here

/* 454 */         ASTree expr = new Member(this.val$m);
/* 455 */         if (this.val$texpr != null) {
/* 456 */           expr = Expr.make(46, this.val$texpr, expr);
/*     */         }
/* 458 */         expr = CallExpr.makeCall(expr, args);
/* 459 */         expr.accept(check);
/* 460 */         check.addNullIfVoid();
/*     */       }
/*     */     };
/* 464 */     this.gen.setProceedHandler(h, "$proceed");
/*     */   }
View Full Code Here

/*      */     }
/*      */
/*  354 */     if (isPlusExpr(left)) {
/*  355 */       Expr newExpr = atPlusExpr((BinExpr)left);
/*  356 */       if (newExpr != null) {
/*  357 */         right.accept(this);
/*  358 */         this.exprType = 307;
/*  359 */         this.arrayDim = 0;
/*  360 */         this.className = "java/lang/StringBuffer";
/*  361 */         return makeAppendCall(newExpr, right);
/*      */       }
View Full Code Here

/*  365 */       left.accept(this);
/*      */     }
/*  367 */     int type1 = this.exprType;
/*  368 */     int dim1 = this.arrayDim;
/*  369 */     String cname = this.className;
/*  370 */     right.accept(this);
/*      */
/*  372 */     if (isConstant(expr, 43, left, right)) {
/*  373 */       return null;
/*      */     }
/*  375 */     if (((type1 == 307) && (dim1 == 0) && ("java/lang/String".equals(cname))) || ((this.exprType == 307) && (this.arrayDim == 0) && ("java/lang/String".equals(this.className))))
View Full Code Here

/*  407 */       return false;
/*      */     }
/*  409 */     expr.setOperator(43);
/*  410 */     expr.setOprand1(newExpr);
/*  411 */     expr.setOprand2(null);
/*  412 */     newExpr.accept(this);
/*  413 */     return true;
/*      */   }
/*      */
/*      */   static ASTree stripPlusExpr(ASTree expr)
/*      */   {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.