Package javassist.bytecode

Examples of javassist.bytecode.SignatureAttribute$Cursor


   private void copySignature(CtClass src, CtClass dest)
   {
      ClassFile srcFile = src.getClassFile2();
      ClassFile destFile = dest.getClassFile2();
     
      SignatureAttribute sig = (SignatureAttribute)srcFile.getAttribute(SignatureAttribute.tag);
      if (sig != null)
      {
         destFile.addAttribute(sig.copy(destFile.getConstPool(), new HashMap()));
      }
   }
View Full Code Here


      CtMethod wmethod = CtNewMethod.make(CtClass.voidType, wrapperName, writeParam, null, "{}", clazz);
      wmethod.setModifiers(mod);
      Instrumentor.addSyntheticAttribute(wmethod);
      clazz.addMethod(wmethod);
     
      SignatureAttribute ai = (SignatureAttribute) field.getFieldInfo2().getAttribute(SignatureAttribute.tag);
      if (ai != null)
      {
         MethodInfo wrapperInfo = wmethod.getMethodInfo2();
         SignatureAttribute methodAtt = new SignatureAttribute(wrapperInfo.getConstPool(), "(" + ai.getSignature() + ")V");
         wrapperInfo.addAttribute(methodAtt);
      }
     
      return wmethod;
   }
View Full Code Here

      Instrumentor.addSyntheticAttribute(wmethod);
      clazz.addMethod(wmethod);
     
      // copy attribute signature
      MethodInfo constructorInfo = constructor.getMethodInfo2();
      SignatureAttribute attribute = (SignatureAttribute) constructorInfo.getAttribute(SignatureAttribute.tag);
      if (attribute != null)
      {
         MethodInfo wrapperInfo = wmethod.getMethodInfo2();
         @SuppressWarnings("unchecked")
         HashMap map = new HashMap();
         wrapperInfo.addAttribute(attribute.copy(wrapperInfo.getConstPool(), map));
      }
     
      // prepare ForWrapping
      getWrapper().prepareForWrapping(constructor, CONSTRUCTOR_STATUS);
   }
View Full Code Here

/* 498 */     wmethod.setModifiers(mod);
/* 499 */     setTemporaryWrapperCode(type, wmethod);
/* 500 */     clazz.addMethod(wmethod);
/*     */
/* 503 */     MethodInfo constructorInfo = constructor.getMethodInfo2();
/* 504 */     SignatureAttribute attribute = (SignatureAttribute)constructorInfo.getAttribute("Signature");
/* 505 */     if (attribute != null)
/*     */     {
/* 507 */       MethodInfo wrapperInfo = wmethod.getMethodInfo2();
/* 508 */       wrapperInfo.addAttribute(attribute.copy(wrapperInfo.getConstPool(), new HashMap()));
/*     */     }
/*     */
/* 512 */     getWrapper().prepareForWrapping(constructor, 0);
/*     */   }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   private void copySignature(javassist.bytecode.MethodInfo src, javassist.bytecode.MethodInfo dest)
/*     */   {
/* 276 */     SignatureAttribute attribute = (SignatureAttribute)src.getAttribute("Signature");
/* 277 */     if (attribute != null)
/*     */     {
/* 279 */       dest.addAttribute(attribute.copy(dest.getConstPool(), new HashMap()));
/*     */     }
/*     */   }
View Full Code Here

/*     */
/* 592 */     CtMethod wmethod = CtNewMethod.make(CtClass.voidType, wrapperName, writeParam, null, "{}", clazz);
/* 593 */     wmethod.setModifiers(mod);
/* 594 */     clazz.addMethod(wmethod);
/*     */
/* 596 */     SignatureAttribute ai = (SignatureAttribute)field.getFieldInfo2().getAttribute("Signature");
/* 597 */     if (ai != null)
/*     */     {
/* 599 */       MethodInfo wrapperInfo = wmethod.getMethodInfo2();
/* 600 */       SignatureAttribute methodAtt = new SignatureAttribute(wrapperInfo.getConstPool(), "(" + ai.getSignature() + ")V");
/* 601 */       wrapperInfo.addAttribute(methodAtt);
/*     */     }
/*     */
/* 604 */     return wmethod;
/*     */   }
View Full Code Here

/*     */   private void copySignature(CtMethod src, CtMethod dest)
/*     */   {
/* 875 */     javassist.bytecode.MethodInfo srcInfo = src.getMethodInfo2();
/* 876 */     javassist.bytecode.MethodInfo destInfo = dest.getMethodInfo2();
/*     */
/* 878 */     SignatureAttribute sig = (SignatureAttribute)srcInfo.getAttribute("Signature");
/* 879 */     if (sig != null)
/*     */     {
/* 881 */       destInfo.addAttribute(sig.copy(destInfo.getConstPool(), new HashMap()));
/*     */     }
/*     */   }
View Full Code Here

/*     */   private void copySignature(CtClass src, CtClass dest)
/*     */   {
/* 887 */     ClassFile srcFile = src.getClassFile2();
/* 888 */     ClassFile destFile = dest.getClassFile2();
/*     */
/* 890 */     SignatureAttribute sig = (SignatureAttribute)srcFile.getAttribute("Signature");
/* 891 */     if (sig != null)
/*     */     {
/* 893 */       destFile.addAttribute(sig.copy(destFile.getConstPool(), new HashMap()));
/*     */     }
/*     */   }
View Full Code Here

/*     */
/*     */   public static void addSignature(CtField field, String signature)
/*     */   {
/*  72 */     FieldInfo fieldInfo = field.getFieldInfo();
/*  73 */     ConstPool constPool = fieldInfo.getConstPool();
/*  74 */     SignatureAttribute signatureAttribute = new SignatureAttribute(constPool, signature);
/*  75 */     fieldInfo.addAttribute(signatureAttribute);
/*     */   }
View Full Code Here

/*     */
/*     */   public static void addSignature(CtMethod method, String signature)
/*     */   {
/*  80 */     MethodInfo methodInfo = method.getMethodInfo();
/*  81 */     ConstPool constPool = methodInfo.getConstPool();
/*  82 */     SignatureAttribute signatureAttribute = new SignatureAttribute(constPool, signature);
/*  83 */     methodInfo.addAttribute(signatureAttribute);
/*     */   }
View Full Code Here

TOP

Related Classes of javassist.bytecode.SignatureAttribute$Cursor

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.