package slangc.model; public class BuiltinTypeModel extends SyntheticTypeModel { private final BuiltinTypeBehaviour builtinTypeBehaviour; public BuiltinTypeModel(PackageModel packageModel, String name, TypeLevel level, TypeModel owner, BuiltinTypeBehaviour builtinTypeBehaviour) { super(packageModel, name, level, owner); this.builtinTypeBehaviour = builtinTypeBehaviour; } public BuiltinTypeBehaviour getBuiltinTypeBehaviour() { return builtinTypeBehaviour; } @Override public TypeType getTypeType() { return TypeType.BUILTIN; } @Override public int expand() { return 0; } @Override public int resolveTypes() { //System.out.println("TODO: resolveTypes in " + this.getClass().getName()); return 0; } @Override public boolean isObjectType() { return false; } @Override public boolean isAssignableFrom(TypeModel otherType) { if (super.isAssignableFrom(otherType)) { return true; } else { return getBuiltinTypeBehaviour().isAssignableFrom(otherType); } } }