Package javassist.compiler.ast

Examples of javassist.compiler.ast.ASTList


/* 1096 */     throw new CompileError("bad l-value");
/*      */   }
/*      */
/*      */   public CtClass[] makeParamList(MethodDecl md) throws CompileError
/*      */   {
/* 1101 */     ASTList plist = md.getParams();
/*      */     CtClass[] params;
/*      */     CtClass[] params;
/* 1102 */     if (plist == null) {
/* 1103 */       params = new CtClass[0];
/*      */     } else {
/* 1105 */       int i = 0;
/* 1106 */       params = new CtClass[plist.length()];
/* 1107 */       while (plist != null) {
/* 1108 */         params[(i++)] = this.resolver.lookupClass((Declarator)plist.head());
/* 1109 */         plist = plist.tail();
/*      */       }
/*      */     }
/*      */
/* 1113 */     return params;
/*      */   }
View Full Code Here


/* 1113 */     return params;
/*      */   }
/*      */
/*      */   public CtClass[] makeThrowsList(MethodDecl md) throws CompileError
/*      */   {
/* 1118 */     ASTList list = md.getThrows();
/* 1119 */     if (list == null) {
/* 1120 */       return null;
/*      */     }
/* 1122 */     int i = 0;
/* 1123 */     CtClass[] clist = new CtClass[list.length()];
/* 1124 */     while (list != null) {
/* 1125 */       clist[(i++)] = this.resolver.lookupClassByName((ASTList)list.head());
/* 1126 */       list = list.tail();
/*      */     }
/*      */
/* 1129 */     return clist;
/*      */   }
View Full Code Here

/*      */   public void atFieldDecl(FieldDecl field) throws CompileError {
/*  251 */     field.getInit().accept(this);
/*      */   }
/*      */
/*      */   public void atMethodDecl(MethodDecl method) throws CompileError {
/*  255 */     ASTList mods = method.getModifiers();
/*  256 */     setMaxLocals(1);
/*  257 */     while (mods != null) {
/*  258 */       Keyword k = (Keyword)mods.head();
/*  259 */       mods = mods.tail();
/*  260 */       if (k.get() == 335) {
/*  261 */         setMaxLocals(0);
/*  262 */         this.inStaticMethod = true;
/*      */       }
/*      */     }
/*      */
/*  266 */     ASTList params = method.getParams();
/*  267 */     while (params != null) {
/*  268 */       atDeclarator((Declarator)params.head());
/*  269 */       params = params.tail();
/*      */     }
/*      */
/*  272 */     Stmnt s = method.getBody();
/*  273 */     atMethodBody(s, method.isConstructor(), method.getReturn().getType() == 344);
/*      */   }
View Full Code Here

/*  340 */         else if (this.exprType != 344)
/*  341 */           this.bytecode.addOpcode(87);
/*      */       }
/*      */     }
/*  344 */     else if ((op == 68) || (op == 66)) {
/*  345 */       ASTList list = st;
/*  346 */       while (list != null) {
/*  347 */         ASTree h = list.head();
/*  348 */         list = list.tail();
/*  349 */         if (h != null)
/*  350 */           h.accept(this);
/*      */       }
/*      */     }
/*  353 */     else if (op == 320) {
View Full Code Here

/*  456 */     ArrayList prevContList = this.continueList;
/*  457 */     this.breakList = new ArrayList();
/*  458 */     this.continueList = new ArrayList();
/*      */
/*  460 */     Stmnt init = (Stmnt)st.head();
/*  461 */     ASTList p = st.tail();
/*  462 */     ASTree expr = p.head();
/*  463 */     p = p.tail();
/*  464 */     Stmnt update = (Stmnt)p.head();
/*  465 */     Stmnt body = (Stmnt)p.tail();
/*      */
/*  467 */     if (init != null) {
/*  468 */       init.accept(this);
/*      */     }
/*  470 */     int pc = this.bytecode.currentPc();
View Full Code Here

TOP

Related Classes of javassist.compiler.ast.ASTList

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.