]> source.dussan.org Git - aspectj.git/commitdiff
generics
authorAndy Clement <aclement@vmware.com>
Fri, 2 Mar 2012 16:14:26 +0000 (08:14 -0800)
committerAndy Clement <aclement@vmware.com>
Fri, 2 Mar 2012 16:14:26 +0000 (08:14 -0800)
org.aspectj.matcher/src/org/aspectj/weaver/patterns/ExactTypePattern.java
org.aspectj.matcher/src/org/aspectj/weaver/patterns/OrTypePattern.java
org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java

index bf3ac901830e46ec771b12d85c39df2cf2fb2936..68353422fb1b99977cac621eba927fee06a32beb 100644 (file)
@@ -310,14 +310,13 @@ public class ExactTypePattern extends TypePattern {
        @Override
        public TypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) {
                throw new BCException("trying to re-resolve");
-
        }
 
        /**
         * return a version of this type pattern with all type variables references replaced by the corresponding entry in the map.
         */
        @Override
-       public TypePattern parameterizeWith(Map typeVariableMap, World w) {
+       public TypePattern parameterizeWith(Map<String,UnresolvedType> typeVariableMap, World w) {
                UnresolvedType newType = type;
                if (type.isTypeVariableReference()) {
                        TypeVariableReference t = (TypeVariableReference) type;
index d61917a998b20330f55df8d79db8205e20e134ab..b31a4e9adb36b249eba1cc9b1613892dbd286848 100644 (file)
@@ -19,6 +19,7 @@ import org.aspectj.util.FuzzyBoolean;
 import org.aspectj.weaver.CompressingDataOutputStream;
 import org.aspectj.weaver.ISourceContext;
 import org.aspectj.weaver.ResolvedType;
+import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.VersionedDataInputStream;
 import org.aspectj.weaver.World;
 
@@ -122,8 +123,8 @@ public class OrTypePattern extends TypePattern {
                right = right.resolveBindings(scope, bindings, false, false);
                return this;
        }
-
-       public TypePattern parameterizeWith(Map typeVariableMap, World w) {
+       public TypePattern parameterizeWith(Map<String,UnresolvedType> typeVariableMap, World w) {
                TypePattern newLeft = left.parameterizeWith(typeVariableMap, w);
                TypePattern newRight = right.parameterizeWith(typeVariableMap, w);
                OrTypePattern ret = new OrTypePattern(newLeft, newRight);
index 9e091301a9c7b1eba5d32be9137997c7ec689b6f..2d657dee2bee5af5edec0708476da6fe9c53487e 100644 (file)
@@ -166,7 +166,7 @@ public abstract class TypePattern extends PatternNode {
                }
 
                // pr124808
-               Iterator typesIterator = null;
+               Iterator<ResolvedType> typesIterator = null;
                if (type.isTypeVariableReference()) {
                        typesIterator = ((TypeVariableReference) type).getTypeVariable().getFirstBound().resolve(type.getWorld())
                                        .getDirectSupertypes();
@@ -178,8 +178,8 @@ public abstract class TypePattern extends PatternNode {
                        typesIterator = type.getDirectSupertypes();
                }
 
-               for (Iterator i = typesIterator; i.hasNext();) {
-                       ResolvedType superType = (ResolvedType) i.next();
+               for (Iterator<ResolvedType> i = typesIterator; i.hasNext();) {
+                       ResolvedType superType = i.next();
                        if (matchesSubtypes(superType, type)) {
                                return true;
                        }
@@ -198,7 +198,7 @@ public abstract class TypePattern extends PatternNode {
                        superType = superType.getGenericType();
                }
                // FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
-               for (Iterator i = superType.getDirectSupertypes(); i.hasNext();) {
+               for (Iterator<ResolvedType> i = superType.getDirectSupertypes(); i.hasNext();) {
                        ResolvedType superSuperType = (ResolvedType) i.next();
                        if (matchesSubtypes(superSuperType, annotatedType)) {
                                return true;
@@ -253,7 +253,7 @@ public abstract class TypePattern extends PatternNode {
         * return a version of this type pattern in which all type variable references have been replaced by their corresponding entry
         * in the map.
         */
-       public abstract TypePattern parameterizeWith(Map typeVariableMap, World w);
+       public abstract TypePattern parameterizeWith(Map<String, UnresolvedType> typeVariableMap, World w);
 
        public void postRead(ResolvedType enclosingType) {
        }