diff options
author | aclement <aclement> | 2010-06-16 18:03:01 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-06-16 18:03:01 +0000 |
commit | ab171e8594489882d9681ae7591a646614f00357 (patch) | |
tree | f2d4082a840ef062d9ae1a6744e6dd53ae6e9607 | |
parent | 4e4b0a27d207fa3b1aa9c6316f7467328365cb55 (diff) | |
download | aspectj-ab171e8594489882d9681ae7591a646614f00357.tar.gz aspectj-ab171e8594489882d9681ae7591a646614f00357.zip |
generics
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java index ffd8e64be..3e934a78d 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/SignaturePattern.java @@ -137,10 +137,10 @@ public class SignaturePattern extends PatternNode { parameterTargettingAnnotationsAllowed); patternNode.traverse(visitor, null); if (visitor.containedIncorrectTargetKind()) { - Set keys = visitor.getIncorrectTargetKinds().keySet(); - for (Iterator iter = keys.iterator(); iter.hasNext();) { - PatternNode node = (PatternNode) iter.next(); - AnnotationTargetKind[] targetKinds = (AnnotationTargetKind[]) visitor.getIncorrectTargetKinds().get(node); + Set<ExactAnnotationTypePattern> keys = visitor.getIncorrectTargetKinds().keySet(); + for (Iterator<ExactAnnotationTypePattern> iter = keys.iterator(); iter.hasNext();) { + PatternNode node = iter.next(); + AnnotationTargetKind[] targetKinds = visitor.getIncorrectTargetKinds().get(node); reportUnmatchedTargetKindMessage(targetKinds, node, scope, false); } } @@ -173,7 +173,7 @@ public class SignaturePattern extends PatternNode { private class TypePatternVisitor extends AbstractPatternNodeVisitor { private IScope scope; - private Map incorrectTargetKinds /* PatternNode -> AnnotationTargetKind[] */= new HashMap(); + private Map<ExactAnnotationTypePattern, AnnotationTargetKind[]> incorrectTargetKinds = new HashMap<ExactAnnotationTypePattern, AnnotationTargetKind[]>(); private boolean targetsOtherThanTypeAllowed; private boolean parameterTargettingAnnotationsAllowed; @@ -268,7 +268,7 @@ public class SignaturePattern extends PatternNode { return (incorrectTargetKinds.size() != 0); } - public Map getIncorrectTargetKinds() { + public Map<ExactAnnotationTypePattern, AnnotationTargetKind[]> getIncorrectTargetKinds() { return incorrectTargetKinds; } } @@ -606,10 +606,6 @@ public class SignaturePattern extends PatternNode { } } - private ResolvedType[] getResolvedParameters(World world, UnresolvedType[] unresolvedParams) { - return world.resolve(unresolvedParams); - } - /** * match on declaring type, parameter types, throws types */ @@ -700,9 +696,8 @@ public class SignaturePattern extends PatternNode { // FIXME asc duplicate of code in AnnotationPointcut.matchInternal()? same fixmes apply here. // ResolvedMember [] mems = member.getDeclaringType().resolve(world).getDeclaredFields(); // FIXME asc should include // supers with getInterTypeMungersIncludingSupers? - List mungers = member.getDeclaringType().resolve(world).getInterTypeMungers(); - for (Iterator iter = mungers.iterator(); iter.hasNext();) { - ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) iter.next(); + List<ConcreteTypeMunger> mungers = member.getDeclaringType().resolve(world).getInterTypeMungers(); + for (ConcreteTypeMunger typeMunger : mungers) { if (typeMunger.getMunger() instanceof NewFieldTypeMunger) { ResolvedMember fakerm = typeMunger.getSignature(); ResolvedMember ajcMethod = AjcMemberMaker.interFieldInitializer(fakerm, typeMunger.getAspectType()); |