diff options
author | aclement <aclement> | 2005-11-14 16:08:04 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-14 16:08:04 +0000 |
commit | ccd571e8b952c0b67d15f1d30d5a19f91b7e97ef (patch) | |
tree | 53ea7eb4a8d83ebde9255fab53f346c2bbdd6775 | |
parent | c0731dabc77601d0a4841a8736274afdcec20941 (diff) | |
download | aspectj-ccd571e8b952c0b67d15f1d30d5a19f91b7e97ef.tar.gz aspectj-ccd571e8b952c0b67d15f1d30d5a19f91b7e97ef.zip |
fixes for pr115788 - primitive handling.
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedType.java | 1 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/TypeFactory.java | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/ResolvedType.java b/weaver/src/org/aspectj/weaver/ResolvedType.java index 51d962d9d..34a7b05e2 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedType.java +++ b/weaver/src/org/aspectj/weaver/ResolvedType.java @@ -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; diff --git a/weaver/src/org/aspectj/weaver/TypeFactory.java b/weaver/src/org/aspectj/weaver/TypeFactory.java index eb6350b33..c90672bd3 100644 --- a/weaver/src/org/aspectj/weaver/TypeFactory.java +++ b/weaver/src/org/aspectj/weaver/TypeFactory.java @@ -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); } |