]> source.dussan.org Git - aspectj.git/commitdiff
generics: one fix to ensure the class we output says 'class X implement I' rather...
authoraclement <aclement>
Mon, 4 Jul 2005 14:59:57 +0000 (14:59 +0000)
committeraclement <aclement>
Mon, 4 Jul 2005 14:59:57 +0000 (14:59 +0000)
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java

index 653da49a0a8f42862b58c96f5c1de5135d61e831..4989b6483ae0690be3d06a1da97b8ce5167c8b93 100644 (file)
@@ -453,6 +453,27 @@ public final class LazyClassGen {
                        // of attribute are confirmed to be correct.
                        // myGen.addAttribute(getSourceDebugExtensionAttribute());
                }
+               
+// TODO asc generics, fix up the declared signature attribute (dont need this just yet...)
+//             Attribute sigAttribute = null;
+//             Attribute[] as = myGen.getAttributes();
+//             for (int i = 0; i < as.length; i++) {
+//                     Attribute attribute = as[i];
+//                     if (attribute.getName().equals("Signature")) sigAttribute = attribute;
+//             }
+//             if (sigAttribute!=null) {
+//                     // Got it
+//                     myGen.removeAttribute(sigAttribute);
+//                     
+//                     int nameIndex = constantPoolGen.addUtf8("Signature");
+//                     String data = ((Signature)sigAttribute).getSignature()+"LJ<java/"
+//                     //System.err.println(data);
+//                     byte[] bytes = Utility.stringToUTF(data);
+//                     int length = bytes.length;
+//
+//                     return new Unknown(nameIndex, length, bytes, constantPoolGen.getConstantPool());        
+//                     new org.aspectj.apache.bcel.classfile.Signature((Signature)sigAttribute);
+//             }
     }
 
        /**
@@ -497,7 +518,7 @@ public final class LazyClassGen {
     }
     
     public void addInterface(TypeX typeX, ISourceLocation sourceLocation) {
-       myGen.addInterface(typeX.getName());
+       myGen.addInterface(typeX.getRawName());
         if (!typeX.equals(TypeX.SERIALIZABLE)) 
                  warnOnAddedInterface(typeX.getName(),sourceLocation);
     }