]> source.dussan.org Git - aspectj.git/commitdiff
fixes for pr115788 - primitive handling.
authoraclement <aclement>
Mon, 14 Nov 2005 16:08:04 +0000 (16:08 +0000)
committeraclement <aclement>
Mon, 14 Nov 2005 16:08:04 +0000 (16:08 +0000)
weaver/src/org/aspectj/weaver/ResolvedType.java
weaver/src/org/aspectj/weaver/TypeFactory.java

index 51d962d9dc24abff1905375f6b933a99c1951b28..34a7b05e2934c0b60023d50f0b2507d805af7fd5 100644 (file)
@@ -838,6 +838,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
             super(signature, null);
             this.size = size;
             this.index = index;
+            this.typeKind=TypeKind.PRIMITIVE;
         }
         public final int getSize() {
             return size;
index eb6350b3393fda625b5ee031fe42bb1ac419047e..c90672bd3782674bd1c5a0bfc598f2dd6a4e3db2 100644 (file)
@@ -116,6 +116,18 @@ public class TypeFactory {
                        UnresolvedType componentType = createTypeFromSignature(signature.substring(dims));
                        return new UnresolvedType(signature,
                                        signature.substring(0,dims)+componentType.getErasureSignature());
+               } else if (signature.length()==1) { // could be a primitive
+                 switch (signature.charAt(0)) {
+                         case 'V': return ResolvedType.VOID;
+                         case 'Z': return ResolvedType.BOOLEAN;
+                         case 'B': return ResolvedType.BYTE;
+                         case 'C': return ResolvedType.CHAR;
+                         case 'D': return ResolvedType.DOUBLE;
+                         case 'F': return ResolvedType.FLOAT;
+                         case 'I': return ResolvedType.INT;
+                         case 'J': return ResolvedType.LONG;
+                         case 'S': return ResolvedType.SHORT;
+                 }
                }
                return new UnresolvedType(signature);
        }