aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2005-05-06 15:18:54 +0000
committeraclement <aclement>2005-05-06 15:18:54 +0000
commit952dda914064ff58a39fc682d18cdbf3ad171475 (patch)
treee68ecb5cefb0d4352fdc9bddd5e329974011b19f /org.aspectj.ajdt.core
parent7389d9fc0252b90a9b0bf2cb1861a0f3802ad320 (diff)
downloadaspectj-952dda914064ff58a39fc682d18cdbf3ad171475.tar.gz
aspectj-952dda914064ff58a39fc682d18cdbf3ad171475.zip
Fix for 91053 (Generics): Generics problem with Set
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
index 395094b25..b294efccb 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
@@ -192,8 +192,12 @@ public class EclipseFactory {
return TypeX.forName(getName(tvb.superclass));
}
}
- // FIXME asc/amc cope properly with RawTypeBindings
- if (binding instanceof ParameterizedTypeBinding && !(binding instanceof RawTypeBinding)) {
+
+ if (binding instanceof ParameterizedTypeBinding) {
+ if (binding instanceof RawTypeBinding) {
+ // special case where no parameters are specified!
+ return TypeX.forRawTypeNames(getName(binding));
+ }
ParameterizedTypeBinding ptb = (ParameterizedTypeBinding) binding;
String[] arguments = new String[ptb.arguments.length];
for (int i = 0; i < arguments.length; i++) {
@@ -348,16 +352,22 @@ public class EclipseFactory {
typeX = typeX.getComponentType();
}
return lookupEnvironment.createArrayType(makeTypeBinding(typeX), dim);
- } else if (typeX.isParameterized()){
- TypeX[] typeParameters = typeX.getTypeParameters();
- ReferenceBinding baseTypeBinding = lookupBinding(typeX.getBaseName());
- ReferenceBinding[] argumentBindings = new ReferenceBinding[typeParameters.length];
- for (int i = 0; i < argumentBindings.length; i++) {
- argumentBindings[i] = lookupBinding(typeParameters[i].getName());
+ } else if (typeX.isParameterized()) {
+ if (typeX.isRawType()) {
+ ReferenceBinding baseTypeBinding = lookupBinding(typeX.getBaseName());
+ RawTypeBinding rtb = lookupEnvironment.createRawType(baseTypeBinding,baseTypeBinding.enclosingType());
+ return rtb;
+ } else {
+ TypeX[] typeParameters = typeX.getTypeParameters();
+ ReferenceBinding baseTypeBinding = lookupBinding(typeX.getBaseName());
+ ReferenceBinding[] argumentBindings = new ReferenceBinding[typeParameters.length];
+ for (int i = 0; i < argumentBindings.length; i++) {
+ argumentBindings[i] = lookupBinding(typeParameters[i].getName());
+ }
+ ParameterizedTypeBinding ptb =
+ lookupEnvironment.createParameterizedType(baseTypeBinding,argumentBindings,baseTypeBinding.enclosingType());
+ return ptb;
}
- ParameterizedTypeBinding ptb =
- lookupEnvironment.createParameterizedType(baseTypeBinding,argumentBindings,baseTypeBinding.enclosingType());
- return ptb;
} else {
return lookupBinding(typeX.getName());
}