use of org.eclipse.ceylon.compiler.java.runtime.metamodel.decl.ImportImpl in project ceylon by eclipse.
the class ModuleImpl method getDependencies.
@Override
@TypeInfo("ceylon.language::Sequential<ceylon.language.meta.declaration::Import>")
public Sequential<? extends Import> getDependencies() {
// no need to synchronise as concurrent invocations should get the same array back
if (this.dependencies == null) {
List<org.eclipse.ceylon.model.typechecker.model.ModuleImport> modelImports = declaration.getImports();
// FreeImport[] imports = new FreeImport[modelImports.size()];
ArrayList<ImportImpl> sb = new ArrayList<ImportImpl>(modelImports.size());
for (org.eclipse.ceylon.model.typechecker.model.ModuleImport moduleImport : modelImports) {
sb.add(new ImportImpl(this, moduleImport));
}
ImportImpl[] array = sb.toArray(new ImportImpl[0]);
this.dependencies = new ObjectArrayIterable<ImportImpl>(Import.$TypeDescriptor$, array).sequence();
}
return this.dependencies;
}
Aggregations