]> source.dussan.org Git - aspectj.git/commitdiff
improved tolerance for generics signature chars
authoracolyer <acolyer>
Fri, 8 Jul 2005 16:05:54 +0000 (16:05 +0000)
committeracolyer <acolyer>
Fri, 8 Jul 2005 16:05:54 +0000 (16:05 +0000)
weaver/src/org/aspectj/weaver/TypeX.java

index b0b5509e87c47aad7dc69058b50f0a313ef4b165..1d46f33a3059d9d3f4912e9d92f18932cb724b64 100644 (file)
@@ -340,6 +340,9 @@ public class TypeX implements AnnotatedElement {
             case 'V': return ResolvedTypeX.VOID;
             case 'Z': return ResolvedTypeX.BOOLEAN;
             case '[': return new TypeX(signature);
+            case '+': return new TypeX(signature);
+            case '-' : return new TypeX(signature);
+            case '?' : return GenericsWildcardTypeX.GENERIC_WILDCARD;
             default:  throw new BCException("Bad type signature " + signature);
         }      
     }
@@ -897,6 +900,8 @@ public class TypeX implements AnnotatedElement {
 //            case '<': 
 //             // its a generic!
  //            if (signature.charAt(1)=='>') return signatureToName(signature.substring(2));
+            case '+' : return signatureToName(signature.substring(1, signature.length()));
+            case '-' : return signatureToName(signature.substring(1, signature.length()));
             default: 
                 throw new BCException("Bad type signature: " + signature);
         }