Package javassist.bytecode

Examples of javassist.bytecode.SignatureAttribute$ObjectType


/*     */   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

          aMethod = CtNewMethod.getter(booleanGetterName(aProp), aNewField);
        }

        inheritAnnotations(theClass, aMethod);

        SignatureAttribute attr = (SignatureAttribute) aNewField.getFieldInfo().getAttribute(SignatureAttribute.tag);
        if (attr != null) {
          aMethod.getMethodInfo().addAttribute(new SignatureAttribute(aMethod.getMethodInfo().getConstPool(), "()"+attr.getSignature()));
        }

        theClass.addMethod(aMethod);
      }

      if (!hasMethod(theClass, setterName(aProp))) {
        CtMethod aMethod = CtNewMethod.setter(setterName(aProp), aNewField);

        inheritAnnotations(theClass, aMethod);

        SignatureAttribute attr = (SignatureAttribute) aNewField.getFieldInfo().getAttribute(SignatureAttribute.tag);
        if (attr != null) {
          aMethod.getMethodInfo().addAttribute(new SignatureAttribute(aMethod.getMethodInfo().getConstPool(), "("+attr.getSignature()+")V"));
        }

        theClass.addMethod(aMethod);
      }
    }
View Full Code Here

            else {
              aName = ((Class)t).getName();
            }


            aNewField.getFieldInfo().addAttribute(new SignatureAttribute(aNewField.getFieldInfo().getConstPool(), "L"+aType.getName().replace('.','/')+ "<"+aFlag+"L" + aName.replace('.','/') + ";>;")) ;
          }
        }

        aMap.put(aProp, aNewField);
      }
View Full Code Here

   private void copySignature(CtMethod src, CtMethod dest)
   {
      javassist.bytecode.MethodInfo srcInfo = src.getMethodInfo2();
      javassist.bytecode.MethodInfo destInfo = dest.getMethodInfo2();
     
      SignatureAttribute sig = (SignatureAttribute)srcInfo.getAttribute(SignatureAttribute.tag);
      if (sig != null)
      {
         destInfo.addAttribute(sig.copy(destInfo.getConstPool(), new HashMap()));
      }
   }
View Full Code Here

   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

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

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

      }
   }

   private void copySignature(MethodInfo src, MethodInfo dest)
   {
      SignatureAttribute attribute = (SignatureAttribute) src.getAttribute(SignatureAttribute.tag);
      if (attribute != null)
      {
         @SuppressWarnings("unchecked")
         HashMap map = new HashMap();
         dest.addAttribute(attribute.copy(dest.getConstPool(), map));
      }
   }
View Full Code Here

TOP

Related Classes of javassist.bytecode.SignatureAttribute$ObjectType

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.