simpleTx = UnresolvedType.forName(getName(binding));
}
}else {
simpleTx = UnresolvedType.forName(getName(binding));
}
ReferenceType name = getWorld().lookupOrCreateName(simpleTx);
EclipseSourceType t = new EclipseSourceType(name, this, binding, decl, unit);
// For generics, go a bit further - build a typex for the generic type
// give it the same delegate and link it to the raw type
if (binding.isGenericType()) {
UnresolvedType complexTx = fromBinding(binding); // fully aware of any generics info
ResolvedType cName = world.resolve(complexTx,true);
ReferenceType complexName = null;
if (!cName.isMissing()) {
complexName = (ReferenceType) cName;
complexName = (ReferenceType) complexName.getGenericType();
if (complexName == null) complexName = new ReferenceType(complexTx,world);
} else {
complexName = new ReferenceType(complexTx,world);
}
name.setGenericType(complexName);
complexName.setDelegate(t);
complexName.setSourceContext(t.getResolvedTypeX().getSourceContext());
}
name.setDelegate(t);
if (decl instanceof AspectDeclaration) {
((AspectDeclaration)decl).typeX = name;