From: aclement Date: Mon, 12 May 2008 19:29:19 +0000 (+0000) Subject: bring refactoring up to date. X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=af8af82f298d169b4d558b0d1fef3ab0d3a1a677;p=aspectj.git bring refactoring up to date. --- diff --git a/weaver/src/org/aspectj/weaver/TypeVariable.java b/weaver/src/org/aspectj/weaver/TypeVariable.java index d85d7412d..d5045ecd8 100644 --- a/weaver/src/org/aspectj/weaver/TypeVariable.java +++ b/weaver/src/org/aspectj/weaver/TypeVariable.java @@ -215,7 +215,20 @@ public class TypeVariable { // can match any type in the range of the type variable... // XXX what about interfaces? private boolean matchingBounds(TypeVariableReferenceType tvrt) { - if (tvrt.getUpperBound() != getUpperBound()) return false; + if (tvrt.getUpperBound() != getUpperBound()) { + UnresolvedType unresolvedCandidateUpperBound = tvrt.getUpperBound(); + UnresolvedType unresolvedThisUpperBound = getUpperBound(); + if (unresolvedCandidateUpperBound instanceof ResolvedType && unresolvedThisUpperBound instanceof ResolvedType) { + ResolvedType candidateUpperBound = (ResolvedType)unresolvedCandidateUpperBound; + ResolvedType thisUpperBound = (ResolvedType)unresolvedThisUpperBound; + if (!thisUpperBound.isAssignableFrom(candidateUpperBound)) { + return false; + } + } else { + // not right, they shouldnt have been unresolved... + return false; + } + } if (tvrt.hasLowerBound() != (getLowerBound() != null)) return false; if (tvrt.hasLowerBound() && tvrt.getLowerBound() != getLowerBound()) return false; // either we both have bounds, or neither of us have bounds @@ -379,6 +392,7 @@ public class TypeVariable { public String getGenericSignature() { return "T"+name+";"; +// return "T"+getSignature(); } public String getErasureSignature() { return getFirstBound().getErasureSignature(); diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelField.java b/weaver/src/org/aspectj/weaver/bcel/BcelField.java index 5b374d683..34204c55b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelField.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelField.java @@ -145,6 +145,14 @@ final class BcelField extends ResolvedMemberImpl { return annotations; } + public AnnotationX getAnnotationOfType(UnresolvedType ofType) { + ensureAnnotationTypesRetrieved(); + for (int i=0; i