use of org.eclipse.ceylon.compiler.java.runtime.model.ReifiedType in project ceylon by eclipse.
the class Metamodel method getProducedType.
public static Type getProducedType(TypeDescriptor reifiedType) {
Type producedType;
synchronized (getLock()) {
producedType = typeDescriptorToProducedType.get(reifiedType);
if (producedType == null) {
producedType = reifiedType.toType(moduleManager);
typeDescriptorToProducedType.put(reifiedType, producedType);
}
}
return producedType;
}
use of org.eclipse.ceylon.compiler.java.runtime.model.ReifiedType 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