]> source.dussan.org Git - aspectj.git/commitdiff
generics
authoraclement <aclement>
Sat, 7 Nov 2009 00:23:11 +0000 (00:23 +0000)
committeraclement <aclement>
Sat, 7 Nov 2009 00:23:11 +0000 (00:23 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/Member.java
org.aspectj.matcher/src/org/aspectj/weaver/MemberImpl.java

index a3c91d369cb940c1b90f6050689d128342700c69..5e684da3d1fe6a303b359024a33a61fac1b02105 100644 (file)
@@ -87,7 +87,7 @@ public interface Member extends Comparable {
 
        public AnnotationAJ[] getAnnotations();
 
-       public Collection/* ResolvedType */getDeclaringTypes(World world);
+       public Collection<ResolvedType> getDeclaringTypes(World world);
 
        public String[] getParameterNames(World world);
 
index 878c38ffbc44c568d47a0345f53164fef8504d4e..553fed430e14e56993b379fcafddf7dd7b3d8ec2 100644 (file)
@@ -440,9 +440,9 @@ public class MemberImpl implements Member {
 
        // ---- fields 'n' stuff
 
-       public Collection/* ResolvedType */getDeclaringTypes(World world) {
+       public Collection<ResolvedType> getDeclaringTypes(World world) {
                ResolvedType myType = getDeclaringType().resolve(world);
-               Collection ret = new HashSet();
+               Collection<ResolvedType> ret = new HashSet<ResolvedType>();
                if (kind == CONSTRUCTOR) {
                        // this is wrong if the member doesn't exist, but that doesn't
                        // matter
@@ -456,14 +456,14 @@ public class MemberImpl implements Member {
                return ret;
        }
 
-       private boolean walkUp(Collection acc, ResolvedType curr) {
+       private boolean walkUp(Collection<ResolvedType> acc, ResolvedType curr) {
                if (acc.contains(curr)) {
                        return true;
                }
 
                boolean b = false;
-               for (Iterator i = curr.getDirectSupertypes(); i.hasNext();) {
-                       b |= walkUp(acc, (ResolvedType) i.next());
+               for (Iterator<ResolvedType> i = curr.getDirectSupertypes(); i.hasNext();) {
+                       b |= walkUp(acc, i.next());
                }
 
                if (!b && curr.isParameterizedType()) {