public static final ResolvedType[] EMPTY_RESOLVED_TYPE_ARRAY = new ResolvedType[0];
public static final String PARAMETERIZED_TYPE_IDENTIFIER = "P";
- // Set during a type pattern match call - this currently used to hold the
+ // Set temporarily during a type pattern match call - this currently used to hold the
// annotations that may be attached to a type when it used as a parameter
public ResolvedType[] temporaryAnnotationTypes;
private ResolvedType[] resolvedTypeParams;
public abstract int getModifiers();
- // return true if this resolved type couldn't be found (but we know it's
- // name maybe)
+ // return true if this resolved type couldn't be found (but we know it's name maybe)
public boolean isMissing() {
return false;
}
}
}
}
- if (!resolvedType.equals(ResolvedType.OBJECT)) {
+ // BUG? interface type superclass is Object - is that correct?
+ if (!resolvedType.isInterface() && !resolvedType.equals(ResolvedType.OBJECT)) {
ResolvedType superType = resolvedType.getSuperclass();
if (superType != null && !superType.isMissing()) {
if (!genericsAware && superType.isParameterizedOrGenericType()) {
sig = munger.getSignature(); // possibly changed when type parms filled in
if (sig.getKind() == Member.METHOD) {
- if (clashesWithExistingMember(munger, getMethodsWithoutIterator(false, true, false).iterator())) {
+ // OPTIMIZE can this be sped up?
+ if (clashesWithExistingMember(munger, getMethods(true, false))) { // ITDs checked below
return;
}
if (this.isInterface()) {
+ // OPTIMIZE this set of methods are always the same - must we keep creating them as a list?
if (clashesWithExistingMember(munger, Arrays.asList(world.getCoreType(OBJECT).getDeclaredMethods()).iterator())) {
return;
}
interTypeMungers.add(munger);
}
+// private void printIterator(String string, Iterator<ResolvedMember> iterator) {
+// System.out.println(">" + string);
+// while (iterator.hasNext()) {
+// ResolvedMember rm = iterator.next();
+// System.out.println(" " + rm);
+// }
+// System.out.println("<" + string);
+// }
+
/**
* Compare the type transformer with the existing members. A clash may not be an error (the ITD may be the 'default
* implementation') so returning false is not always a sign of an error.