From: aclement Date: Sat, 7 Nov 2009 19:39:02 +0000 (+0000) Subject: reorg to make patching easier X-Git-Tag: V1_6_7~131 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8b5f2f89fec8ad3c810f6dd1c282ef5dedea4e66;p=aspectj.git reorg to make patching easier --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index 8721c092d..b86c11d78 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -434,14 +434,14 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl */ public List getMethodsWithoutIterator(boolean includeITDs, boolean allowMissing) { List methods = new ArrayList(); - Set knowninterfaces = new HashSet(); + Set knowninterfaces = new HashSet(); addAndRecurse(knowninterfaces, methods, this, includeITDs, allowMissing, false); return methods; } public List getMethodsWithoutIterator(boolean includeITDs, boolean allowMissing, boolean genericsAware) { List methods = new ArrayList(); - Set knowninterfaces = new HashSet(); + Set knowninterfaces = new HashSet(); addAndRecurse(knowninterfaces, methods, this, includeITDs, allowMissing, genericsAware); return methods; } @@ -460,7 +460,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl return types; } - private void addAndRecurse(Set knowninterfaces, List collector, ResolvedType resolvedType, + private void addAndRecurse(Set knowninterfaces, List collector, ResolvedType resolvedType, boolean includeITDs, boolean allowMissing, boolean genericsAware) { // Add the methods declared on this type collector.addAll(Arrays.asList(resolvedType.getDeclaredMethods())); @@ -476,7 +476,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl if (!resolvedType.equals(ResolvedType.OBJECT)) { ResolvedType superType = resolvedType.getSuperclass(); if (superType != null && !superType.isMissing()) { - if (genericsAware && superType.isParameterizedType()) { + if (!genericsAware && superType.isParameterizedOrGenericType()) { superType = superType.getRawType(); } // Recurse if we are not at the top @@ -487,7 +487,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl ResolvedType[] interfaces = resolvedType.getDeclaredInterfaces(); for (int i = 0; i < interfaces.length; i++) { ResolvedType iface = interfaces[i]; - if (!genericsAware && iface.isParameterizedType()) { + if (!genericsAware && iface.isParameterizedOrGenericType()) { iface = iface.getRawType(); } // we need to know if it is an interface from Parent kind munger @@ -504,8 +504,8 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl } // Do not do interfaces more than once - if (!shouldSkip && !knowninterfaces.contains(iface)) { - knowninterfaces.add(iface); + if (!shouldSkip && !knowninterfaces.contains(iface.getSignature())) { + knowninterfaces.add(iface.getSignature()); if (allowMissing && iface.isMissing()) { if (iface instanceof MissingResolvedTypeWithKnownSignature) { ((MissingResolvedTypeWithKnownSignature) iface).raiseWarningOnMissingInterfaceWhilstFindingMethods(); @@ -792,21 +792,13 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl return dupFilter.filter(o.getDirectSupertypes()); } }; - Iterators.Getter pointcutGetter = new Iterators.Getter() { - public Iterator get(ResolvedType o) { - // System.err.println("getting for " + o); - return Iterators.array(o.getDeclaredPointcuts()); - } - }; - return Iterators.mapOver(Iterators.recur(this, typeGetter), pointcutGetter); + return Iterators.mapOver(Iterators.recur(this, typeGetter), PointcutGetterInstance); } public ResolvedPointcutDefinition findPointcut(String name) { - // System.err.println("looking for pointcuts " + this); for (Iterator i = getPointcuts(); i.hasNext();) { ResolvedPointcutDefinition f = (ResolvedPointcutDefinition) i.next(); - // the resolvedpointcutdefinition can be null if there are other problems that - // prevented its resolution + // the ResolvedPointcutDefinition can be null if there are other problems that prevented its resolution if (f != null && name.equals(f.getName())) { return f; } @@ -1777,8 +1769,6 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl munger = fillInAnyTypeParameters(munger); sig = munger.getSignature(); // possibly changed when type parms filled in - // System.err.println("add: " + munger + " to " + this.getClassName() + - // " with " + interTypeMungers); if (sig.getKind() == Member.METHOD) { if (clashesWithExistingMember(munger, getMethodsWithoutIterator(false, true).iterator())) { return;