diff options
author | aclement <aclement> | 2005-10-11 08:25:03 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-10-11 08:25:03 +0000 |
commit | 0a69e42808527ec7daa32ec2d4bbf183ca8b4f4b (patch) | |
tree | 7c0602405c4b5297996255190dcf3a47423c5acc /weaver/src | |
parent | 074261689aede2fdb288e2fe2615bca466cfc098 (diff) | |
download | aspectj-0a69e42808527ec7daa32ec2d4bbf183ca8b4f4b.tar.gz aspectj-0a69e42808527ec7daa32ec2d4bbf183ca8b4f4b.zip |
generic itds - see pr112105
Diffstat (limited to 'weaver/src')
11 files changed, 209 insertions, 96 deletions
diff --git a/weaver/src/org/aspectj/weaver/JoinPointSignature.java b/weaver/src/org/aspectj/weaver/JoinPointSignature.java index 92b7fadf0..7b3689173 100644 --- a/weaver/src/org/aspectj/weaver/JoinPointSignature.java +++ b/weaver/src/org/aspectj/weaver/JoinPointSignature.java @@ -202,13 +202,17 @@ public class JoinPointSignature implements ResolvedMember { return realMember.parameterizedWith(typeParameters, newDeclaringType, isParameterized); } - public void setTypeVariables(UnresolvedType[] types) { + public void setTypeVariables(TypeVariable[] types) { realMember.setTypeVariables(types); } - public UnresolvedType[] getTypeVariables() { + public TypeVariable[] getTypeVariables() { return realMember.getTypeVariables(); } + + public TypeVariable getTypeVariableNamed(String name) { + return realMember.getTypeVariableNamed(name); + } public ResolvedMember getErasure() { throw new UnsupportedOperationException("Adrian doesn't think you should be asking for the erasure of one of these..."); diff --git a/weaver/src/org/aspectj/weaver/ResolvedMember.java b/weaver/src/org/aspectj/weaver/ResolvedMember.java index 44507e5c1..24736d403 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedMember.java +++ b/weaver/src/org/aspectj/weaver/ResolvedMember.java @@ -113,9 +113,9 @@ public interface ResolvedMember extends Member, AnnotatedElement, TypeVariableDe UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized); - public void setTypeVariables(UnresolvedType[] types); + public void setTypeVariables(TypeVariable[] types); - public UnresolvedType[] getTypeVariables(); + public TypeVariable[] getTypeVariables(); /** * If this member is defined by a parameterized super-type, return the erasure diff --git a/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java b/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java index 23a2e57c4..855d6bf75 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java +++ b/weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java @@ -50,7 +50,7 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno private boolean isAjSynthetic = true; // generic methods have type variables - private UnresolvedType[] typeVariables; + private TypeVariable[] typeVariables; // these three fields hold the source location of this member protected int start, end; @@ -385,9 +385,10 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno int tvcount = s.readInt(); if (tvcount!=0) { - m.typeVariables = new UnresolvedType[tvcount]; + m.typeVariables = new TypeVariable[tvcount]; for (int i=0;i<tvcount;i++) { - m.typeVariables[i]=UnresolvedType.read(s); + m.typeVariables[i]=TypeVariable.read(s); + m.typeVariables[i].setDeclaringElement(m); } } } @@ -407,30 +408,37 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno public ResolvedMember resolve(World world) { // make sure all the pieces of a resolvedmember really are resolved - if (annotationTypes!=null) { - Set r = new HashSet(); - for (Iterator iter = annotationTypes.iterator(); iter.hasNext();) { - UnresolvedType element = (UnresolvedType) iter.next(); - r.add(world.resolve(element)); - } - annotationTypes = r; - } - declaringType = declaringType.resolve(world); - if (declaringType.isRawType()) declaringType = ((ReferenceType)declaringType).getGenericType(); - if (typeVariables!=null && typeVariables.length>0) { - for (int i = 0; i < typeVariables.length; i++) { - UnresolvedType array_element = typeVariables[i]; - typeVariables[i] = typeVariables[i].resolve(world); - } - } - if (parameterTypes!=null && parameterTypes.length>0) { - for (int i = 0; i < parameterTypes.length; i++) { - UnresolvedType array_element = parameterTypes[i]; - parameterTypes[i] = parameterTypes[i].resolve(world); + try { + if (typeVariables!=null && typeVariables.length>0) { + for (int i = 0; i < typeVariables.length; i++) { + typeVariables[i] = typeVariables[i].resolve(world); + } } + world.setTypeVariableLookupScope(this); + if (annotationTypes!=null) { + Set r = new HashSet(); + for (Iterator iter = annotationTypes.iterator(); iter.hasNext();) { + UnresolvedType element = (UnresolvedType) iter.next(); + r.add(world.resolve(element)); + } + annotationTypes = r; + } + declaringType = declaringType.resolve(world); + if (declaringType.isRawType()) declaringType = ((ReferenceType)declaringType).getGenericType(); + + if (parameterTypes!=null && parameterTypes.length>0) { + for (int i = 0; i < parameterTypes.length; i++) { + UnresolvedType array_element = parameterTypes[i]; + // parameterTypes[i] = parameterTypes[i].resolve(world); + parameterTypes[i] = parameterTypes[i].resolve(world); + } + } + + returnType = returnType.resolve(world); + } finally { + world.setTypeVariableLookupScope(null); } - - returnType = returnType.resolve(world);return this; + return this; } public ISourceContext getSourceContext(World world) { @@ -567,11 +575,11 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno } - public void setTypeVariables(UnresolvedType[] types) { - typeVariables = types; + public void setTypeVariables(TypeVariable[] tvars) { + typeVariables = tvars; } - public UnresolvedType[] getTypeVariables() { + public TypeVariable[] getTypeVariables() { return typeVariables; } @@ -758,5 +766,20 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno } return buf.toString(); } + + + + public TypeVariable getTypeVariableNamed(String name) { + // Check locally... + if (typeVariables!=null) { + for (int i = 0; i < typeVariables.length; i++) { + if (typeVariables[i].getName().equals(name)) return typeVariables[i]; + } + } + // Bugger, check the declaring type! + return declaringType.getTypeVariableNamed(name); + + // Do generic aspects with ITDs that share type variables with the aspect and the target type and have their own tvars cause this to be messier? + } } diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java index 8b0de53a4..125e436f4 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java @@ -47,8 +47,6 @@ public abstract class ResolvedTypeMunger { // might need serializing the class file for binary weaving. protected List /*String*/ typeVariableToGenericTypeVariableIndex; - public static transient boolean persistSourceLocation = true; - private Set /* resolvedMembers */ superMethodsCalled = Collections.EMPTY_SET; private ISourceLocation location; // Lost during serialize/deserialize ! @@ -138,6 +136,7 @@ public abstract class ResolvedTypeMunger { Set ret = new HashSet(); int n = s.readInt(); + if (n<0) throw new BCException("Problem deserializing type munger"); for (int i=0; i < n; i++) { ret.add(ResolvedMemberImpl.readResolvedMember(s, null)); } @@ -146,7 +145,7 @@ public abstract class ResolvedTypeMunger { protected void writeSuperMethodsCalled(DataOutputStream s) throws IOException { - if (superMethodsCalled == null) { + if (superMethodsCalled == null || superMethodsCalled.size()==0) { s.writeInt(0); return; } @@ -163,7 +162,6 @@ public abstract class ResolvedTypeMunger { } protected static ISourceLocation readSourceLocation(VersionedDataInputStream s) throws IOException { - if (!persistSourceLocation) return null; // Location persistence for type mungers was added after 1.2.1 was shipped... if (s.getMajorVersion()<AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) return null; SourceLocation ret = null; @@ -196,7 +194,6 @@ public abstract class ResolvedTypeMunger { } protected void writeSourceLocation(DataOutputStream s) throws IOException { - if (!persistSourceLocation) return; ObjectOutputStream oos = new ObjectOutputStream(s); // oos.writeObject(location); oos.writeObject(new Boolean(location!=null)); diff --git a/weaver/src/org/aspectj/weaver/TypeVariable.java b/weaver/src/org/aspectj/weaver/TypeVariable.java index 9718179ab..1488bb25b 100644 --- a/weaver/src/org/aspectj/weaver/TypeVariable.java +++ b/weaver/src/org/aspectj/weaver/TypeVariable.java @@ -11,6 +11,8 @@ * ******************************************************************/ package org.aspectj.weaver; +import java.io.DataOutputStream; +import java.io.IOException; import java.util.HashSet; import java.util.Set; @@ -106,10 +108,10 @@ public class TypeVariable { /** * resolve all the bounds of this type variable */ - public void resolve(World inSomeWorld) { - if (beingResolved) { return; } // avoid spiral of death + public TypeVariable resolve(World inSomeWorld) { + if (beingResolved) { return this; } // avoid spiral of death beingResolved = true; - if (isResolved) return; + if (isResolved) return this; TypeVariable resolvedTVar = null; @@ -128,13 +130,14 @@ public class TypeVariable { } else { // look for type variable on method... ResolvedMember declaring = (ResolvedMember) declaringElement; - UnresolvedType[] tvrts = declaring.getTypeVariables(); + TypeVariable[] tvrts = declaring.getTypeVariables(); for (int i = 0; i < tvrts.length; i++) { - if (tvrts[i].isTypeVariableReference()) { - TypeVariableReferenceType tvrt = (TypeVariableReferenceType) tvrts[i].resolve(inSomeWorld); - TypeVariable tv = tvrt.getTypeVariable(); - if (tv.getName().equals(getName())) resolvedTVar = tv; - } + if (tvrts[i].getName().equals(getName())) resolvedTVar = tvrts[i]; +// if (tvrts[i].isTypeVariableReference()) { +// TypeVariableReferenceType tvrt = (TypeVariableReferenceType) tvrts[i].resolve(inSomeWorld); +// TypeVariable tv = tvrt.getTypeVariable(); +// if (tv.getName().equals(getName())) resolvedTVar = tv; +// } } } @@ -155,12 +158,14 @@ public class TypeVariable { upperBound = upperBound.resolve(inSomeWorld); if (lowerBound != null) lowerBound = lowerBound.resolve(inSomeWorld); - for (int i = 0; i < additionalInterfaceBounds.length; i++) { - additionalInterfaceBounds[i] = additionalInterfaceBounds[i].resolve(inSomeWorld); + if (additionalInterfaceBounds!=null) { + for (int i = 0; i < additionalInterfaceBounds.length; i++) { + additionalInterfaceBounds[i] = additionalInterfaceBounds[i].resolve(inSomeWorld); + } } - isResolved = true; beingResolved = false; + return this; } /** @@ -320,4 +325,37 @@ public class TypeVariable { return declaringElementKind; } + public void write(DataOutputStream s) throws IOException { + // name, upperbound, additionalInterfaceBounds, lowerbound + s.writeUTF(name); + upperBound.write(s); + if (additionalInterfaceBounds==null || additionalInterfaceBounds.length==0) { + s.writeInt(0); + } else { + s.writeInt(additionalInterfaceBounds.length); + for (int i = 0; i < additionalInterfaceBounds.length; i++) { + UnresolvedType ibound = additionalInterfaceBounds[i]; + ibound.write(s); + } + } + } + + public static TypeVariable read(VersionedDataInputStream s) throws IOException { + + //if (s.getMajorVersion()>=AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) { + + String name = s.readUTF(); + UnresolvedType ubound = UnresolvedType.read(s); + int iboundcount = s.readInt(); + UnresolvedType[] ibounds = null; + if (iboundcount>0) { + ibounds = new UnresolvedType[iboundcount]; + for (int i=0; i<iboundcount; i++) { + ibounds[i] = UnresolvedType.read(s); + } + } + + TypeVariable newVariable = new TypeVariable(name,ubound,ibounds); + return newVariable; + } } diff --git a/weaver/src/org/aspectj/weaver/TypeVariableDeclaringElement.java b/weaver/src/org/aspectj/weaver/TypeVariableDeclaringElement.java index 618c87dba..6a4a17ac8 100644 --- a/weaver/src/org/aspectj/weaver/TypeVariableDeclaringElement.java +++ b/weaver/src/org/aspectj/weaver/TypeVariableDeclaringElement.java @@ -19,5 +19,5 @@ package org.aspectj.weaver; * the declaring element */ public interface TypeVariableDeclaringElement { - + public TypeVariable getTypeVariableNamed(String name); } diff --git a/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java b/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java index f5e5e3306..59b3b1b19 100644 --- a/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java +++ b/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java @@ -22,6 +22,12 @@ public class TypeVariableReferenceType extends BoundedReferenceType implements T private TypeVariable typeVariable; private boolean resolvedIfBounds = false; + // If 'fixedUp' then the type variable in here is a reference to the real one that may + // exist either on a member or a type. Not fixedUp means that we unpacked a generic + // signature and weren't able to fix it up during resolution (didn't quite know enough + // at the right time). Wonder if we can fix it up late? + boolean fixedUp = false; + public TypeVariableReferenceType( TypeVariable aTypeVariable, World aWorld) { @@ -62,6 +68,7 @@ public class TypeVariableReferenceType extends BoundedReferenceType implements T } public TypeVariable getTypeVariable() { + // if (!fixedUp) throw new BCException("ARGH"); // SAUSAGES - fix it up now? return typeVariable; } @@ -104,17 +111,17 @@ public class TypeVariableReferenceType extends BoundedReferenceType implements T public void write(DataOutputStream s) throws IOException { super.write(s); - TypeVariableDeclaringElement tvde = typeVariable.getDeclaringElement(); - if (tvde == null) { - s.writeInt(TypeVariable.UNKNOWN); - } else { - s.writeInt(typeVariable.getDeclaringElementKind()); - if (typeVariable.getDeclaringElementKind() == TypeVariable.TYPE) { - ((UnresolvedType)tvde).write(s); - } else if (typeVariable.getDeclaringElementKind() == TypeVariable.METHOD){ - // it's a method - ((ResolvedMember)tvde).write(s); - } - } +// TypeVariableDeclaringElement tvde = typeVariable.getDeclaringElement(); +// if (tvde == null) { +// s.writeInt(TypeVariable.UNKNOWN); +// } else { +// s.writeInt(typeVariable.getDeclaringElementKind()); +// if (typeVariable.getDeclaringElementKind() == TypeVariable.TYPE) { +// ((UnresolvedType)tvde).write(s); +// } else if (typeVariable.getDeclaringElementKind() == TypeVariable.METHOD){ +// // it's a method +// ((ResolvedMember)tvde).write(s); +// } +// } } } diff --git a/weaver/src/org/aspectj/weaver/UnresolvedType.java b/weaver/src/org/aspectj/weaver/UnresolvedType.java index e40867c8a..7b0ef3972 100644 --- a/weaver/src/org/aspectj/weaver/UnresolvedType.java +++ b/weaver/src/org/aspectj/weaver/UnresolvedType.java @@ -779,10 +779,6 @@ public class UnresolvedType implements TypeVariableDeclaringElement { return ResolvedType.MISSING; } else { UnresolvedType ret = UnresolvedType.forSignature(sig); - // ugh, this is horrid, we shouldn't know about this subclass. - if (ret instanceof UnresolvedTypeVariableReferenceType) { - UnresolvedTypeVariableReferenceType.readDeclaringElement(s, (UnresolvedTypeVariableReferenceType)ret); - } return ret; } } @@ -883,5 +879,14 @@ public class UnresolvedType implements TypeVariableDeclaringElement { throw new RuntimeException("I dont know - you should ask a resolved version of me: "+this); } + public TypeVariable getTypeVariableNamed(String name) { + if (typeVariables==null || typeVariables.length==0) return null; + for (int i = 0; i < typeVariables.length; i++) { + TypeVariable aVar = typeVariables[i]; + if (aVar.getName().equals(name)) return aVar; + } + return null; + } + } diff --git a/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java b/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java index 75eaa9710..e9db34508 100644 --- a/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java +++ b/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java @@ -11,7 +11,6 @@ * ******************************************************************/ package org.aspectj.weaver; -import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; @@ -41,13 +40,56 @@ public class UnresolvedTypeVariableReferenceType extends UnresolvedType implemen } public ResolvedType resolve(World world) { - if (typeVariable == null) { - throw new BCException("Cannot resolve this type variable reference, the type variable has not been set!"); + TypeVariableDeclaringElement typeVariableScope = world.getTypeVariableLookupScope(); + TypeVariable resolvedTypeVariable = null; + TypeVariableReferenceType tvrt = null; + if (typeVariableScope == null) { + // throw new BCException("There is no scope in which to lookup type variables!"); + // SAUSAGES correct thing to do is go bang, but to limp along, lets cope with the scope missing + resolvedTypeVariable = typeVariable.resolve(world); + tvrt = new TypeVariableReferenceType(resolvedTypeVariable,world); + } else { + boolean foundOK = false; + resolvedTypeVariable = typeVariableScope.getTypeVariableNamed(typeVariable.getName()); + // SAUSAGES remove this when the shared type var stuff is sorted + if (resolvedTypeVariable == null) { + resolvedTypeVariable = typeVariable.resolve(world); + } else { + foundOK = true; + } + tvrt = new TypeVariableReferenceType(resolvedTypeVariable,world); + tvrt.fixedUp = foundOK; } - typeVariable.resolve(world); - return new TypeVariableReferenceType(typeVariable,world); + + return tvrt; +// // SAUSAGES should really be resolved in a scope, or you won't get the type variable you really want! +// //throw new BCException("NO - UnresolvedTypeVariableReferenceTypes must be resolved in a type variable scope"); +// if (typeVariable == null) { +// throw new BCException("Cannot resolve this type variable reference, the type variable has not been set!"); +// } +// typeVariable.resolve(world); +// return new TypeVariableReferenceType(typeVariable,world); } +// public ResolvedType resolve(World world,TypeVariableDeclaringElement tvde) { +// if (typeVariable == null) { +// throw new BCException("Cannot resolve this type variable reference, the type variable has not been set!"); +// } +// +// // SAUSAGES temporary whilst the ITD logic gets sorted out +// if (tvde == null) return new TypeVariableReferenceType(typeVariable.resolve(world),world); +// +// TypeVariable resolvedTypeVariable = tvde.getTypeVariableNamed(typeVariable.getName()); +// if (resolvedTypeVariable == null) { +// resolvedTypeVariable = typeVariable.resolve(world); +// // SAUSAGES put this in once ITDs remember the complex shared type var stuff +// // throw new BCException("Could not locate type variable '"+typeVariable.getName()+"' during resolution, scope was: "+tvde); +// } +// TypeVariableReferenceType tvrt = new TypeVariableReferenceType(resolvedTypeVariable,world); +// tvrt.fixedUp = true; +// return tvrt; +// } + public boolean isTypeVariableReference() { return true; } @@ -71,20 +113,8 @@ public class UnresolvedTypeVariableReferenceType extends UnresolvedType implemen public void write(DataOutputStream s) throws IOException { super.write(s); - TypeVariableDeclaringElement tvde = typeVariable.getDeclaringElement(); - if (tvde == null) { - s.writeInt(TypeVariable.UNKNOWN); - } else { - s.writeInt(typeVariable.getDeclaringElementKind()); - if (typeVariable.getDeclaringElementKind() == TypeVariable.TYPE) { - ((UnresolvedType)tvde).write(s); - } else if (typeVariable.getDeclaringElementKind() == TypeVariable.METHOD){ - // it's a method - ((ResolvedMember)tvde).write(s); - } - } } - + /* public static void readDeclaringElement(DataInputStream s, UnresolvedTypeVariableReferenceType utv) throws IOException { int kind = s.readInt(); @@ -97,5 +127,5 @@ public class UnresolvedTypeVariableReferenceType extends UnresolvedType implemen utv.typeVariable.setDeclaringElement(rm); } } - +*/ } diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index 1d42e44d2..e68bcaf25 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -45,6 +45,9 @@ public abstract class World implements Dump.INode { /** handler for cross-reference information produced during the weaving process */ private ICrossReferenceHandler xrefHandler = null; + /** Currently 'active' scope in which to lookup (resolve) typevariable references */ + private TypeVariableDeclaringElement typeVariableLookupScope; + /** The heart of the world, a map from type signatures to resolved types */ protected TypeMap typeMap = new TypeMap(); // Signature to ResolvedType @@ -329,7 +332,7 @@ public abstract class World implements Dump.INode { // is backed by a simple type rather than a generic type. This occurs for // inner types of generic types that inherit their enclosing types // type variables. - if (rawType.isSimpleType() && anUnresolvedType.typeParameters.length==0) { + if (rawType.isSimpleType() && (anUnresolvedType.typeParameters==null || anUnresolvedType.typeParameters.length==0)) { rawType.world = this; return rawType; } @@ -546,6 +549,15 @@ public abstract class World implements Dump.INode { public ICrossReferenceHandler getCrossReferenceHandler() { return this.xrefHandler; } + + public void setTypeVariableLookupScope(TypeVariableDeclaringElement scope) { + this.typeVariableLookupScope = scope; + } + + public TypeVariableDeclaringElement getTypeVariableLookupScope() { + return typeVariableLookupScope; + } + public List getDeclareParents() { return crosscuttingMembersSet.getDeclareParents(); diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 0205d0a08..3d7455fb1 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -106,15 +106,12 @@ public class BcelTypeMunger extends ConcreteTypeMunger { weaver.getLazyClassGen().getOrCreateWeaverStateInfo(weaver.getReweavableMode()); info.addConcreteMunger(this); } - // Whilst type mungers aren't persisting their source locations, we add this relationship during - // compilation time (see other reference to ResolvedTypeMunger.persist) - if (ResolvedTypeMunger.persistSourceLocation) { - if (changed && worthReporting) { - if (munger.getKind().equals(ResolvedTypeMunger.Parent)) { - AsmRelationshipProvider.getDefault().addRelationship(weaver.getLazyClassGen().getType(), munger,getAspectType()); - } else { - AsmRelationshipProvider.getDefault().addRelationship(weaver.getLazyClassGen().getType(), munger,getAspectType()); - } + + if (changed && worthReporting) { + if (munger.getKind().equals(ResolvedTypeMunger.Parent)) { + AsmRelationshipProvider.getDefault().addRelationship(weaver.getLazyClassGen().getType(), munger,getAspectType()); + } else { + AsmRelationshipProvider.getDefault().addRelationship(weaver.getLazyClassGen().getType(), munger,getAspectType()); } } @@ -894,7 +891,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { boolean matchOK = true; for (int j = 0; j < memberParams.length && matchOK; j++){ UnresolvedType memberParam = memberParams[j]; - UnresolvedType lookingForParam = lookingForParams[j].resolve(aspectType.getWorld()); + UnresolvedType lookingForParam = lookingForParams[j].resolve(aspectType.getWorld()); if (lookingForParam.isTypeVariableReference()) lookingForParam = lookingForParam.getUpperBound(); if (!memberParam.equals(lookingForParam)){ matchOK=false; |