Package javassist.bytecode

Examples of javassist.bytecode.ExceptionTable


/*  46 */     this.subTable.clear();
/*  47 */     this.done.clear();
/*     */
/*  49 */     scan(0, iter, null);
/*     */
/*  51 */     ExceptionTable exceptions = code.getExceptionTable();
/*  52 */     for (int i = 0; i < exceptions.size(); i++) {
/*  53 */       int handler = exceptions.handlerPc(i);
/*     */
/*  56 */       scan(handler, iter, this.subroutines[exceptions.startPc(i)]);
/*     */     }
/*     */
/*  59 */     return this.subroutines;
/*     */   }
View Full Code Here


/*     */
/*     */   private ExceptionInfo[] buildExceptionInfo(MethodInfo method) {
/* 213 */     ConstPool constPool = method.getConstPool();
/* 214 */     ClassPool classes = this.clazz.getClassPool();
/*     */
/* 216 */     ExceptionTable table = method.getCodeAttribute().getExceptionTable();
/* 217 */     ExceptionInfo[] exceptions = new ExceptionInfo[table.size()];
/* 218 */     for (int i = 0; i < table.size(); i++) { int index = table.catchType(i);
/*     */       Type type;
/*     */       try { type = index == 0 ? Type.THROWABLE : Type.get(classes.get(constPool.getClassInfo(index)));
/*     */       } catch (NotFoundException e) {
/* 224 */         throw new IllegalStateException(e.getMessage());
/*     */       }
/*     */
/* 227 */       exceptions[i] = new ExceptionInfo(table.startPc(i), table.endPc(i), table.handlerPc(i), type, null);
/*     */     }
/*     */
/* 230 */     return exceptions;
/*     */   }
View Full Code Here

/* 132 */     ClassPool pool = this.thisClass.getClassPool();
/* 133 */     ConstPool cp = this.thisMethod.getConstPool();
/* 134 */     LinkedList list = new LinkedList();
/*     */     try {
/* 136 */       CodeAttribute ca = this.thisMethod.getCodeAttribute();
/* 137 */       ExceptionTable et = ca.getExceptionTable();
/* 138 */       int pos = this.currentPos;
/* 139 */       int n = et.size();
/* 140 */       for (int i = 0; i < n; i++)
/* 141 */         if ((et.startPc(i) <= pos) && (pos < et.endPc(i))) {
/* 142 */           int t = et.catchType(i);
/* 143 */           if (t <= 0) continue;
/*     */           try {
/* 145 */             addClass(list, pool.get(cp.getClassInfo(t)));
/*     */           }
/*     */           catch (NotFoundException e)
View Full Code Here

/*     */
/*  89 */     while (iterator.hasNext()) {
/*  90 */       if (loopBody(iterator, clazz, minfo, context))
/*  91 */         edited = true;
/*     */     }
/*  93 */     ExceptionTable et = codeAttr.getExceptionTable();
/*  94 */     int n = et.size();
/*  95 */     for (int i = 0; i < n; i++) {
/*  96 */       Handler h = new Handler(et, i, iterator, clazz, minfo);
/*  97 */       edit(h);
/*  98 */       if (h.edited()) {
/*  99 */         edited = true;
View Full Code Here

TOP

Related Classes of javassist.bytecode.ExceptionTable

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.