From: Andy Clement Date: Fri, 2 Mar 2012 16:14:26 +0000 (-0800) Subject: generics X-Git-Tag: V1_7_0RC1~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3fa7416111b06016398973d144ddc29cf360ef34;p=aspectj.git generics --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ExactTypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ExactTypePattern.java index bf3ac9018..68353422f 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ExactTypePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ExactTypePattern.java @@ -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 typeVariableMap, World w) { UnresolvedType newType = type; if (type.isTypeVariableReference()) { TypeVariableReference t = (TypeVariableReference) type; diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/OrTypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/OrTypePattern.java index d61917a99..b31a4e9ad 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/OrTypePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/OrTypePattern.java @@ -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 typeVariableMap, World w) { TypePattern newLeft = left.parameterizeWith(typeVariableMap, w); TypePattern newRight = right.parameterizeWith(typeVariableMap, w); OrTypePattern ret = new OrTypePattern(newLeft, newRight); diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java index 9e091301a..2d657dee2 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/TypePattern.java @@ -166,7 +166,7 @@ public abstract class TypePattern extends PatternNode { } // pr124808 - Iterator typesIterator = null; + Iterator 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 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 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 typeVariableMap, World w); public void postRead(ResolvedType enclosingType) { }