import org.simantics.scl.compiler.elaboration.rules.MappingRelation;
import org.simantics.scl.compiler.elaboration.rules.TransformationRule;
import org.simantics.scl.compiler.environment.filter.NamespaceFilter;
+import org.simantics.scl.compiler.errors.CompilationError;
import org.simantics.scl.compiler.internal.codegen.effects.EffectConstructor;
import org.simantics.scl.compiler.top.ModuleInitializer;
import org.simantics.scl.compiler.types.TCon;
public class ConcreteModule implements Module {
String moduleName;
+ String defaultLocalName;
THashMap<String, TypeDescriptor> typeDescriptors = new THashMap<String, TypeDescriptor>();
THashMap<String, EffectConstructor> effectConstructors = new THashMap<String, EffectConstructor>();
THashMap<String, TypeClass> typeClasses = new THashMap<String, TypeClass>();
THashMap<String, MappingRelation> mappingRelations = new THashMap<String, MappingRelation>();
ArrayList<ImportDeclaration> dependencies = new ArrayList<ImportDeclaration>();
THashMap<String, BranchPoint[]> branchPoints;
-
+ CompilationError[] warnings = CompilationError.EMPTY_ARRAY;
+
Map<String, byte[]> classes = Collections.emptyMap();
+ ClassLoader parentClassLoader;
ModuleInitializer moduleInitializer;
protected Documentation documentation;
this.moduleName = moduleName;
}
+ @Override
+ public String getDefaultLocalName() {
+ return defaultLocalName;
+ }
+
+ public void setDefaultLocalName(String defaultLocalName) {
+ this.defaultLocalName = defaultLocalName;
+ }
+
public boolean addTypeDescriptor(String name, TypeDescriptor typeConstructor) {
return typeDescriptors.put(name, typeConstructor) != null;
}
@Override
public void dispose() {
-
+ }
+
+ public void setWarnings(CompilationError[] warnings) {
+ this.warnings = warnings;
+ }
+
+ public CompilationError[] getWarnings() {
+ return warnings;
+ }
+
+ @Override
+ public ClassLoader getParentClassLoader() {
+ return parentClassLoader;
+ }
+
+ public void setParentClassLoader(ClassLoader parentClassLoader) {
+ if(parentClassLoader == null)
+ throw new NullPointerException();
+ this.parentClassLoader = parentClassLoader;
}
}