diff options
author | acolyer <acolyer> | 2005-07-11 13:49:26 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-07-11 13:49:26 +0000 |
commit | 3299a01318c8dfd360f5b970708f261a64bf49e7 (patch) | |
tree | 61c41ce3e47f8f54ebabe671c85545a4552e5692 | |
parent | 3be70641af15361548ab3a576d97fceaea1a9557 (diff) | |
download | aspectj-3299a01318c8dfd360f5b970708f261a64bf49e7.tar.gz aspectj-3299a01318c8dfd360f5b970708f261a64bf49e7.zip |
a simple type pattern for a generic type should match any parameterization of that type
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java index 5703251a8..54a61825f 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java @@ -96,6 +96,9 @@ public class ExactTypePattern extends TypePattern { protected boolean matchesExactly(ResolvedTypeX matchType) { boolean typeMatch = this.type.equals(matchType); + if (!typeMatch && (matchType.isParameterized() || matchType.isGeneric())) { + typeMatch = this.type.equals(matchType.getRawType()); + } annotationPattern.resolve(matchType.getWorld()); boolean annMatch = this.annotationPattern.matches(matchType).alwaysTrue(); return (typeMatch && annMatch); @@ -103,6 +106,9 @@ public class ExactTypePattern extends TypePattern { protected boolean matchesExactly(ResolvedTypeX matchType, ResolvedTypeX annotatedType) { boolean typeMatch = this.type.equals(matchType); + if (!typeMatch && (matchType.isParameterized() || matchType.isGeneric())) { + typeMatch = this.type.equals(matchType.getRawType()); + } annotationPattern.resolve(matchType.getWorld()); boolean annMatch = this.annotationPattern.matches(annotatedType).alwaysTrue(); return (typeMatch && annMatch); |