.getProgressMonitor());
ProjectIterator.iterate(this.openProject, iterator);
}
public Imports getImports(ClassFile cf) {
Imports imports = new Imports(cf.getPackageName());
ConstantPool pool = cf.getPool();
for (int i = 0; i < pool.size(); i++) {
ConstantPoolInfo cpi = pool.get(i);
if (cpi != null) {
if (cpi.getType() == ConstantPoolInfo.CLASS) {
// there can be array definitions here, too
JavaType cls = new JavaType(cpi.getValue());
imports.addType(cls.getType());
} else if (cpi.getType() == ConstantPoolInfo.NAME_AND_TYPE) {
NameAndTypeInfo nati = (NameAndTypeInfo) cpi;
Descriptor desc = nati.getDescriptor();
if (!desc.getReturn().isPrimitive()) {
imports.addType(desc.getReturn().getType());
}
List al = desc.getParamList();
for (int j = 0; j < al.size(); j++) {
JavaType item = (JavaType) al.get(j);
if (!item.isPrimitive()) {
imports.addType(item.getType());
}
}
}
}