slcom/slangc/model/ImportModel.sauce

33 lines
656 B
Plaintext

package slangc.model;
public abstract class ImportModel {
private SystemModel system;
private boolean synthetic;
public ImportModel(SystemModel system, boolean synthetic) {
this.system = system;
this.synthetic = synthetic;
}
public SystemModel getSystem() {
return system;
}
public boolean isSynthetic() {
return synthetic;
}
public abstract TypeModel lookupExact(String name);
public abstract TypeModel lookupLoose(String name);
public final TypeModel lookup(String name) {
TypeModel t = lookupExact(name);
if (t == null) {
return lookupLoose(name);
} else {
return t;
}
}
}