Introduced getInterfacesFull() method to ensure that all interfaces are resolved when creating a vtable.

This commit is contained in:
Izzat Bahadirov 2013-05-01 17:58:58 -04:00
parent 89b28308db
commit d3ac72fd67

View File

@ -141,10 +141,16 @@ public class ClassProto implements TypeProto {
interfacesFullyResolved = false;
}
return interfaces;
}
@Nonnull
protected LinkedHashMap<String, ClassDef> getInterfacesFull() {
LinkedHashMap<String, ClassDef> interfaces = getInterfaces();
if (!interfacesFullyResolved) {
throw new UnresolvedClassException("Interfaces for class %s not fully resolved", getType());
}
return interfaces;
}
@ -519,7 +525,7 @@ public class ClassProto implements TypeProto {
if (!isInterface()) {
addToVtable(getClassDef().getVirtualMethods(), virtualMethodList);
for (ClassDef interfaceDef: getInterfaces().values()) {
for (ClassDef interfaceDef: getInterfacesFull().values()) {
addToVtable(interfaceDef.getVirtualMethods(), virtualMethodList);
}
}