this.contribution = new WeakReference<Contribution>(contribution);
// Index Java import resolvers by package name
Map<String, List<ModelResolver>> resolverMap = new HashMap<String, List<ModelResolver>>();
for (Import import_: this.contribution.get().getImports()) {
if (import_ instanceof JavaImport) {
JavaImport javaImport = (JavaImport)import_;
List<ModelResolver> resolvers = resolverMap.get(javaImport.getPackage());
if (resolvers == null) {
resolvers = new ArrayList<ModelResolver>();
resolverMap.put(javaImport.getPackage(), resolvers);
}
resolvers.add(javaImport.getModelResolver());
}
}
// Create a delegating model resolver for each imported package
for (Map.Entry<String, List<ModelResolver>> entry: resolverMap.entrySet()) {