use of ceylon.language.Sequential in project ceylon by eclipse.
the class Metamodel method getMetamodelSequential.
@SuppressWarnings({ "unchecked", "rawtypes" })
public static Sequential<? extends ceylon.language.meta.declaration.OpenType> getMetamodelSequential(List<Type> types) {
if (types.isEmpty())
return (Sequential<? extends ceylon.language.meta.declaration.OpenType>) (Sequential) empty_.get_();
ceylon.language.meta.declaration.OpenType[] ret = new ceylon.language.meta.declaration.OpenType[types.size()];
int i = 0;
TypeDescriptor td = TypeDescriptor.NothingType;
for (Type pt : types) {
OpenType mm = Metamodel.getMetamodel(pt);
td = TypeDescriptor.union(((ReifiedType) mm).$getType$());
ret[i++] = mm;
}
return Util.sequentialWrapper(td, ret);
}
Aggregations