Package javassist.bytecode

Examples of javassist.bytecode.ExceptionsAttribute


/*  51 */       ClassPool pool = this.clazz.getClassPool();
/*  52 */       MethodInfo minfo = new MethodInfo(cp, "<init>", consDesc);
/*     */
/*  54 */       minfo.setAccessFlags(0);
/*  55 */       minfo.addAttribute(new SyntheticAttribute(cp));
/*  56 */       ExceptionsAttribute ea = orig.getExceptionsAttribute();
/*  57 */       if (ea != null) {
/*  58 */         minfo.addAttribute(ea.copy(cp, null));
/*     */       }
/*  60 */       CtClass[] params = Descriptor.getParameterTypes(desc, pool);
/*  61 */       Bytecode code = new Bytecode(cp);
/*  62 */       code.addAload(0);
/*  63 */       int regno = 1;
View Full Code Here


/* 110 */       ClassPool pool = this.clazz.getClassPool();
/* 111 */       MethodInfo minfo = new MethodInfo(cp, accName, accDesc);
/*     */
/* 113 */       minfo.setAccessFlags(8);
/* 114 */       minfo.addAttribute(new SyntheticAttribute(cp));
/* 115 */       ExceptionsAttribute ea = orig.getExceptionsAttribute();
/* 116 */       if (ea != null) {
/* 117 */         minfo.addAttribute(ea.copy(cp, null));
/*     */       }
/* 119 */       CtClass[] params = Descriptor.getParameterTypes(accDesc, pool);
/* 120 */       int regno = 0;
/* 121 */       Bytecode code = new Bytecode(cp);
/* 122 */       for (int i = 0; i < params.length; i++) {
View Full Code Here

/*      */   }
/*      */
/*      */   public CtClass[] getExceptionTypes()
/*      */     throws NotFoundException
/*      */   {
/*  329 */     ExceptionsAttribute ea = this.methodInfo.getExceptionsAttribute();
/*      */     String[] exceptions;
/*      */     String[] exceptions;
/*  330 */     if (ea == null)
/*  331 */       exceptions = null;
/*      */     else {
/*  333 */       exceptions = ea.getExceptions();
/*      */     }
/*  335 */     return this.declaringClass.getClassPool().get(exceptions);
/*      */   }
View Full Code Here

/*      */
/*  348 */     String[] names = new String[types.length];
/*  349 */     for (int i = 0; i < types.length; i++) {
/*  350 */       names[i] = types[i].getName();
/*      */     }
/*  352 */     ExceptionsAttribute ea = this.methodInfo.getExceptionsAttribute();
/*  353 */     if (ea == null) {
/*  354 */       ea = new ExceptionsAttribute(this.methodInfo.getConstPool());
/*  355 */       this.methodInfo.setExceptionsAttribute(ea);
/*      */     }
/*      */
/*  358 */     ea.setExceptions(names);
/*      */   }
View Full Code Here

/* 332 */     String desc = deleInfo.getDescriptor();
/* 333 */     ConstPool cp = declaring.getClassFile2().getConstPool();
/* 334 */     MethodInfo minfo = new MethodInfo(cp, methodName, desc);
/* 335 */     minfo.setAccessFlags(deleInfo.getAccessFlags());
/*     */
/* 337 */     ExceptionsAttribute eattr = deleInfo.getExceptionsAttribute();
/* 338 */     if (eattr != null) {
/* 339 */       minfo.setExceptionsAttribute((ExceptionsAttribute)eattr.copy(cp, null));
/*     */     }
/*     */
/* 342 */     Bytecode code = new Bytecode(cp, 0, 0);
/* 343 */     boolean isStatic = Modifier.isStatic(delegate.getModifiers());
/* 344 */     CtClass deleClass = delegate.getDeclaringClass();
View Full Code Here

TOP

Related Classes of javassist.bytecode.ExceptionsAttribute

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.