Package javassist.bytecode

Examples of javassist.bytecode.SyntheticAttribute


   public static void addSyntheticAttribute(CtField field)
   {
      FieldInfo info = field.getFieldInfo();
      ConstPool cp = info.getConstPool();
      info.addAttribute(new SyntheticAttribute(cp));
   }
View Full Code Here


/* 146 */       map.put(src.getDeclaringClass().getName(), clazz.getName());
/* 147 */       MethodInfo body = new MethodInfo(classfile.getConstPool(), bodyname, src.getMethodInfo2(), map);
/*     */
/* 150 */       int acc = body.getAccessFlags();
/* 151 */       body.setAccessFlags(AccessFlag.setPrivate(acc));
/* 152 */       body.addAttribute(new SyntheticAttribute(classfile.getConstPool()));
/*     */
/* 154 */       classfile.addMethod(body);
/* 155 */       bodies.put(src, bodyname);
/* 156 */       CtMember.Cache cache = clazz.hasMemberCache();
/* 157 */       if (cache != null) {
View Full Code Here

/*  50 */       ConstPool cp = cf.getConstPool();
/*  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);
View Full Code Here

/* 109 */       ConstPool cp = cf.getConstPool();
/* 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);
View Full Code Here

/*     */       else {
/* 168 */         accDesc = "(" + Descriptor.of(this.clazz) + ")" + fieldType;
/*     */       }
/* 170 */       MethodInfo minfo = new MethodInfo(cp, accName, accDesc);
/* 171 */       minfo.setAccessFlags(8);
/* 172 */       minfo.addAttribute(new SyntheticAttribute(cp));
/* 173 */       Bytecode code = new Bytecode(cp);
/* 174 */       if (is_static) {
/* 175 */         code.addGetstatic(Bytecode.THIS, fieldName, fieldType);
/*     */       }
/*     */       else {
View Full Code Here

/*     */       else {
/* 219 */         accDesc = "(" + Descriptor.of(this.clazz) + fieldType + ")V";
/*     */       }
/* 221 */       MethodInfo minfo = new MethodInfo(cp, accName, accDesc);
/* 222 */       minfo.setAccessFlags(8);
/* 223 */       minfo.addAttribute(new SyntheticAttribute(cp));
/* 224 */       Bytecode code = new Bytecode(cp);
/*     */       int reg;
/* 226 */       if (is_static) {
/* 227 */         int reg = code.addLoad(0, Descriptor.toCtClass(fieldType, pool));
/* 228 */         code.addPutstatic(Bytecode.THIS, fieldName, fieldType);
View Full Code Here

   }
  
   public static void addSyntheticAttribute(MethodInfo info)
   {
      ConstPool cp = info.getConstPool();
      info.addAttribute(new SyntheticAttribute(cp));
   }
View Full Code Here

   public static void addSyntheticAttribute(CtConstructor ctor)
   {
      MethodInfo info = ctor.getMethodInfo();
      ConstPool cp = info.getConstPool();
      info.addAttribute(new SyntheticAttribute(cp));
   }
View Full Code Here

   public static void addSyntheticAttribute(CtField field)
   {
      FieldInfo info = field.getFieldInfo();
      ConstPool cp = info.getConstPool();
      info.addAttribute(new SyntheticAttribute(cp));
   }
View Full Code Here

TOP

Related Classes of javassist.bytecode.SyntheticAttribute

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.