List<String> superList = new ArrayList<String>();
// check all public super methods that are not overridden in superclass
while (nextSupername != null) {
InputStream inputStream = null;
ClassReader cr = null;
try {
inputStream = ClassLoaderUtil.getClassAsStream(nextSupername);
cr = new ClassReader(inputStream);
} catch (IOException ioex) {
throw new ProxettaException("Unable to inspect super class: " + nextSupername, ioex);
} finally {
StreamUtil.close(inputStream);
}
hierarchyLevel++;
superList.add(nextSupername);
superClassReaders.add(cr); // remember the super class reader
cr.accept(new SuperClassVisitor(), 0);
}
superClasses = superList.toArray(new String[superList.size()]);
// check all interface methods that are not overridden in super-interface
if (nextInterfaces != null) {
while (!nextInterfaces.isEmpty()) {
Iterator<String> iterator = nextInterfaces.iterator();
String next = iterator.next();
iterator.remove();
InputStream inputStream = null;
ClassReader cr = null;
try {
inputStream = ClassLoaderUtil.getClassAsStream(next);
cr = new ClassReader(inputStream);
} catch (IOException ioex) {
throw new ProxettaException("Unable to inspect super interface: " + next, ioex);
} finally {
StreamUtil.close(inputStream);
}
hierarchyLevel++;
superClassReaders.add(cr); // remember the super class reader
cr.accept(new SuperClassVisitor(), 0);
}
}
}