use of org.eclipse.ceylon.model.loader.model.LazyElement in project ceylon by eclipse.
the class AbstractModelLoader method inspectForStats.
private int inspectForStats(Map<String, Declaration> cache, Map<Package, Stats> loadedByPackage) {
int loaded = 0;
for (Declaration decl : cache.values()) {
if (decl instanceof LazyElement) {
Package pkg = getPackage(decl);
if (pkg == null) {
logVerbose("[Model loader stats: declaration " + decl.getName() + " has no package. Skipping.]");
continue;
}
Stats stats = loadedByPackage.get(pkg);
if (stats == null) {
stats = new Stats();
loadedByPackage.put(pkg, stats);
}
stats.total++;
if (((LazyElement) decl).isLoaded()) {
loaded++;
stats.loaded++;
}
}
}
return loaded;
}
Aggregations